Skip to content

Instantly share code, notes, and snippets.

@mDuo13
Created August 20, 2021 19:24
Show Gist options
  • Save mDuo13/e0ccff15aedd2a0d216e067eb10605b1 to your computer and use it in GitHub Desktop.
Save mDuo13/e0ccff15aedd2a0d216e067eb10605b1 to your computer and use it in GitHub Desktop.
Test case for ripple-lib issue with trailing zeroes
ripple = require('ripple-lib')
api = new ripple.RippleAPI()
secret = "snenLH1fuSAVsULtAKkfLrmkXUTEt" // Test secret, do not use for anything real
tx_json = JSON.stringify({
"TransactionType": "Payment",
"Account": "rnURbz5HLbvqEq69b1B4TX6cUTNMmcrBqi",
"Amount": {
"currency": "FOO",
"issuer": "rnURbz5HLbvqEq69b1B4TX6cUTNMmcrBqi",
"value": "123.40"
},
"Destination": "rf9XceKtJ1Pt1bbARgBo9KXsgNebhSWwuU",
"DestinationTag": 0,
"Flags": 2147483648,
"Fee": "12",
"Sequence": 20292260
}, null, 0)
console.log(api.sign(tx_json, secret))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment