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
Hello, what is the content of tokenSatoshis ? On the first if seems its the whole "budget", but on the second if seems it's the number of tokens to issue, which fails with totalSupply > 1 .In addition on the throw error message seems it's the whole "budget" again.
Are we misunderstanding something?
(This forces our customers to use the old version of stas-js , as next commit added the second if) : "stas-js": "github:TAAL-GmbH/stas-js#b0beee4253018f3514b2bae1980f06f2cbf6878f"
if (tokenSatoshis % schema.satsPerToken !== 0) {
throw new Error(`Token amount ${tokenSatoshis} must be divisible by satsPerToken ${schema.satsPerToken}`)
}
if ((tokenSatoshis * schema.satsPerToken) > inputUtxos[0].amount) {
throw new Error(`Token Supply of ${tokenSatoshis} with satsPerToken of ${schema.satsPerToken} is greater than input amount of ${inputUtxos[0].amount}`)
}
If we change the if into this, we got it running ok
if ((schema.totalSupply * schema.satsPerToken) > inputUtxos[0].amount) {
throw new Error(`Token Supply of ${tokenSatoshis} with satsPerToken of ${schema.satsPerToken} is greater than input amount of ${inputUtxos[0].amount}`)
}
Thank you!
The text was updated successfully, but these errors were encountered:
Hello, what is the content of
tokenSatoshis
? On the firstif
seems its the whole "budget", but on the secondif
seems it's the number of tokens to issue, which fails withtotalSupply
> 1 .In addition on the throw error message seems it's the whole "budget" again.Are we misunderstanding something?
(This forces our customers to use the old version of stas-js , as next commit added the second if) :
"stas-js": "github:TAAL-GmbH/stas-js#b0beee4253018f3514b2bae1980f06f2cbf6878f"
If we change the
if
into this, we got it running okThank you!
The text was updated successfully, but these errors were encountered: