RGB-WG/rgb-std

no balance on recipient wallet after transfer (script-refactor)

nicbus opened this issue · 2 comments

Using the script-refactor branch (commit b1e1122 plus a cargo update to include the latest fixes) to execute a transfer via CLI, assets are not visible on the recipient wallet.

What I am doing, using opret1st as closing method:

  • issue a NIA asset on wallet 1
  • transfer some assets from wallet 1 to wallet 2

The transfer completes, with the recipient successfully accepting it into the stash, but while the sender sees the RGB change in the contract state, the recipient doesn't see the received assets.

These are the UTXOs after the transfer:

  • wallet 1
Height     Amount, ṩ    Outpoint                                                                                                                                                                                                                                                                                               
bcrt1q57c7r88jquzscyrjsrvlgtln46gcu0hy02yftp    &9/1                                                                                                                                                                                                                                                                           
106         99999600    2a18ac0adad1105377d51f32c51cec9263a89b501a8735706a236ebe3e813ede:0                                                                                                                                                                                                                                     
  • wallet 2
Height     Amount, ṩ    Outpoint                                                             
bcrt1qvuqzxcy3geuyvl67sa8tv0cesm2lnrjmwyqnda    &9/0
105        100000000    21d498d0f235e6b6264d878f50d28c79a5d406bcbac15f566bd744efc184aaba:0

These are the contract states after the transfer:

  • wallet 1
Global:
  spec := (ticker=("USDT"), name=("USD Tether"), details=~, precision=0)
  terms := (text=("demo NIA asset"), media=~)
  issuedSupply := (2000)

Owned:
  assetOwner:
    amount=1900, utxo=bc:opret1st:2a18ac0adad1105377d51f32c51cec9263a89b501a8735706a236ebe3e813ede:0, witness=bc:2a18ac0adad1105377d51f32c51cec9263a89b501a8735706a236ebe3e813ede # owned by the wallet
  • wallet 2
Global:
  spec := (ticker=("USDT"), name=("USD Tether"), details=~, precision=0)
  terms := (text=("demo NIA asset"), media=~)
  issuedSupply := (2000)

Owned:
  assetOwner:

I re-tried this using the current master branch (commit f9813b7) and I find the issue to be still there.

For debugging purposes, here is a tarball containing the consignment and the recipient wallet files (index, stash, state) from the run with commit f9813b7.
failed_xfer_data.tar.gz

Re-tested including #193 and it fixes the issue.