Magickbase / neuron-public-issues

Neuron Issues
6 stars 3 forks source link

Display the amount difference of an account within wallet-connect #212

Open Sven-TBD opened 1 year ago

Sven-TBD commented 1 year ago

The current Amount field in the wallet-connect General Component is the amount of raw transaction data rather than the real amount the account will pay due to the UTXO model.

For example, Account A which have 2 address a_1 and a_2 is supposed to sign a transaction, that is address a_1 put 100 CKB as input, and address a_2 get 10CKB change, and b_1, the dapp's address, get 90 CKB. The Amount field will show 100 CKB on the transaction page, however, the user actually only pays 90 CKB. So putting the actual value of 90 on the transaction page is worthwhile.

image
Sven-TBD commented 1 year ago

这个是UX方面的协议

image

The account model is the recommended implementation model for this protocol. When a dapp is connected to a CKB wallet that implements the account model, the displayed token values on the page represent the net value relative to the account.

Sven-TBD commented 1 year ago

需要注意的是:To Address (可改名为Recipient) ,同时需要去掉list中属于用户账户的找零地址。