MinaFoundation / mina-fungible-token

https://minafoundation.github.io/mina-fungible-token/
Apache License 2.0
18 stars 8 forks source link

Only one transfer is possible to make #42

Closed qwadratic closed 5 months ago

qwadratic commented 6 months ago

For some reason, when doing a transfer, this precondition is implicitly set on the sender account update:

{ account: '{"nonce":{"lower":"0","upper":"0"}}' }

this leads to an issue, that a given account can only create only one transfer. The second one will just fail

qwadratic commented 6 months ago

https://github.com/MinaFoundation/mina-fungible-token/pull/43/files#diff-46f2e2f44c3b9b0008ecb4a0da346fb05b0bf160a9eec5f2c60e5be18f4b1b9e

code to reproduce

qwadratic commented 5 months ago

Not sure why, but the correct way is to use .internal.send()

.transfer doesn't work, because it uses requireSignature which sets nonce precondition to 0 all the time.

.internal.send() uses setLazySignature instead

not sure whats the difference.