Allow specifying amounts in drops (#892)

* Accept "drops" in lieu of "XRP"
* Export xrpToDrops() and dropsToXrp()
* Throw our own validation errors instead of BigNumber Errors
This commit is contained in:
Elliot Lee
2018-05-21 13:19:18 -07:00
committed by GitHub
parent 2e5b435b11
commit 1aa9feda71
14 changed files with 359 additions and 53 deletions

View File

@@ -1,7 +1,7 @@
{
"amount": {
"currency": "XRP",
"value": "1"
"currency": "drops",
"value": "1000000"
},
"checkID": "838766BA2B995C00744175F69A1B11E32C3DBC40E64801A4056FCBD657F57334"
}

View File

@@ -1,7 +1,7 @@
{
"destination": "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW",
"sendMax": {
"currency": "XRP",
"value": "1"
"currency": "drops",
"value": "1000000"
}
}

View File

@@ -6,9 +6,9 @@
"value": "10.1"
},
"totalPrice": {
"currency": "XRP",
"value": "2"
"currency": "drops",
"value": "2000000"
},
"passive": true,
"passive": false,
"fillOrKill": true
}