You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Port changes from
GalaChain#455 to v2
ClosesGalaChain#446
When defined, a lockAuthority on a TokenHold can unlock the token
regardless of ownership.
A token authority can unlock a TokenHold on another users balance
regardless of lockAuthority status.
Refactoring or reworking order of unlocks by token authorities
is out of scope for this immediate fix, should be pursued in a
separate issue if needed.
…469)
* fix: lock authorities and token authorities can unlock fungibles
Port changes from
#455 to v2
Closes#446
When defined, a lockAuthority on a TokenHold can unlock the token
regardless of ownership.
A token authority can unlock a TokenHold on another users balance
regardless of lockAuthority status.
Refactoring or reworking order of unlocks by token authorities
is out of scope for this immediate fix, should be pursued in a
separate issue if needed.
* Update chain-api/src/types/TokenBalance.ts
Safer type definitions
Co-authored-by: Jakub Dzikowski <[email protected]>
* Update chain-api/src/types/TokenBalance.ts
Safer type definitions
Co-authored-by: Jakub Dzikowski <[email protected]>
* fix: TokenBalance.spec.ts after type changes
---------
Co-authored-by: Jakub Dzikowski <[email protected]>
When defined, a
lockAuthority
on aTokenHold
is expected to be able to unlock the token(s) regardless of ownership:https://github.com/GalaChain/sdk/blob/main/chain-api/src/types/TokenBalance.ts#L583-L591
However, the
unlockFungibleTokens
method does not support this logic:https://github.com/GalaChain/sdk/blob/main/chaincode/src/locks/unlockToken.ts#L91-L105
https://github.com/GalaChain/sdk/blob/main/chain-api/src/types/TokenBalance.ts#L583-L591
Based on a read of the logic above, the only scenarios that will result in a successful unlock are:
lockAuthority
on theTokenHold
lockAuthority
on theTokenHold
This issue tracks the following fixes:
lockAuthority
is undefined on theTokenHold
The text was updated successfully, but these errors were encountered: