laboratory icon indicating copy to clipboard operation
laboratory copied to clipboard

Display `claimable_balance_id` to the user after submitting a CreateClaimableBalanceOp

Open marcelosalloum opened this issue 4 years ago • 3 comments

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.

marcelosalloum avatar Jan 19 '21 17:01 marcelosalloum

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 avatar Jan 19 '21 17:01 leighmcculloch

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

leighmcculloch avatar Jan 19 '21 17:01 leighmcculloch

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

marcelosalloum avatar Jan 19 '21 17:01 marcelosalloum