mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
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:
@@ -22,6 +22,8 @@ All "prepare*" methods have the same return type.
|
||||
|
||||
```javascript
|
||||
const address = 'r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59';
|
||||
|
||||
// Buy 10.10 USD (of the specified issuer) for 2.0 XRP (2000000 drops), fill or kill.
|
||||
const order = <%- importFile('test/fixtures/requests/prepare-order.json') %>;
|
||||
return api.prepareOrder(address, order)
|
||||
.then(prepared => {/* ... */});
|
||||
|
||||
Reference in New Issue
Block a user