Skip to content

Commit

Permalink
After TransferLock unlock token (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
olaeseane authored Jan 19, 2023
1 parent 3a9691e commit 106054e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions extensions/token/balance_utxo.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ func (u *UTXOStore) TransferLock(ctx router.Context, id *LockId, transfer *Trans
}

transferLockedOutput.Address = transfer.Recipient
transferLockedOutput.Locked = false // unlock token
if err := State(ctx).Put(transferLockedOutput); err != nil {
return err
}
Expand Down
3 changes: 2 additions & 1 deletion extensions/token/balance_utxo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,8 @@ var _ = Describe(`UTXO store`, func() {
ownerWallet.ExpectLock(Int100)
ownerWallet.ExpectTransferLock(user2Address, Int100.String())
ownerWallet.ExpectLockedBalance(Int0)
user2Wallet.ExpectLockedBalance(Int100)
user2Wallet.ExpectLockedBalance(Int0)
user2Wallet.ExpectBalance(Int200)
})

It(`allow to lock all`, func() {
Expand Down

0 comments on commit 106054e

Please sign in to comment.