interledger / rafiki

An open-source, comprehensive Interledger service for wallet providers, enabling them to provide Interledger functionality to their users.
https://rafiki.dev/
Apache License 2.0
262 stars 88 forks source link

fix: fixed error where no assets were found when opening create peer page #3095

Open oana-lolea opened 1 week ago

oana-lolea commented 1 week ago

Changes proposed in this pull request

Context

Fixes #3046 When trying to create a peer with no existing assets, a 'cannot read properties of undefined' error occurred, because there was a mapper on the assets list. I fixed this by updating loadAssets to return [] in this case.

However, the user might start filling in the form and when he gets to the assets select field (which is the last one) there will be nothing. To prevent this, I added a dialog that warns the user that an asset should be created first and can go to create assets page.

No assets dialog

Checklist

netlify[bot] commented 1 week ago

Deploy Preview for brilliant-pasca-3e80ec ready!

Name Link
Latest commit 4f08f58ebfd83474fe1935b58975cecf7eab1624
Latest deploy log https://app.netlify.com/sites/brilliant-pasca-3e80ec/deploys/673dd57132315f000828ee04
Deploy Preview https://deploy-preview-3095--brilliant-pasca-3e80ec.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.