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,5 +1,5 @@
import {EventEmitter} from 'events'
import {Connection, errors, validate} from './common'
import {Connection, errors, validate, xrpToDrops, dropsToXrp} from './common'
import {
connect,
disconnect,
@@ -300,6 +300,9 @@ class RippleAPI extends EventEmitter {
signPaymentChannelClaim = signPaymentChannelClaim
verifyPaymentChannelClaim = verifyPaymentChannelClaim
errors = errors
xrpToDrops = xrpToDrops
dropsToXrp = dropsToXrp
}
export {