stellar / laboratory

78 stars 89 forks source link

Display `claimable_balance_id` to the user after submitting a CreateClaimableBalanceOp #508

Open marcelosalloum opened 3 years ago

marcelosalloum commented 3 years ago

What

Display claimable_balance_id to the user after submitting a transaction with CreateClaimableBalanceOp.

Why

When you create a claimable balance you need the claimable_balance_id in order to claim it. The full spec can be found in CAP-23

Nowadays we need to access the effects created by the operation in order to gather the claimable_balance_id, as in https://horizon-testnet.stellar.org/operations/5875708534460417/effects.

What alternatives are there?

Since we can gather the claimable_balance_id before submitting the transaction, we could display it somewhere in the box where the claimable balance operation is collecting the details: Screen Shot 2021-01-19 at 12 12 32

We should also add it to the XDR viewer if that is possible when viewing a transaction.

More info can be found in this slack thread.

leighmcculloch commented 3 years ago

The claimable balance is known by the client before the transaction is submitted – it is not generated by the server – and so it there's little reason to rely on a response to get it. I think we should display it on the page somewhere in the box where the claimable balance operation is collecting the details.

leighmcculloch commented 3 years ago

We should also add it to the XDR viewer if that is possible when viewing a transaction.

marcelosalloum commented 3 years ago

Cool, just updated the issue description with that info and suggestion.