stellar / soroban-example-dapp

End-to-End Example Soroban Dapp
Apache License 2.0
1.03k stars 835 forks source link

fix amounts to mint and deposit, swap order btyes #75

Closed dogstarcoin closed 1 year ago

dogstarcoin commented 1 year ago

Trying to mint and deposit reflects a wrong amount. Proposal is to swap the order of bytes are passed to low and high in scoI128.

esteblock commented 1 year ago

Good solution! Waiting for merge

paulbellamy commented 1 year ago

Did a quick manual test with:

let i = convert.bigNumberToI128(BigNumber(10000));
console.log("scval:", i.toXDR("base64"));
console.log("decoded:", convert.scvalToBigNumber(i).toString());

Seems to work. Thanks!