feat: getXrpBalance and dropsToXRP return number (#2574)

BREAKING CHANGE: `dropsToXRP` and `Client.getXrpBalance` now return a `number` instead of a `string`
This commit is contained in:
Caleb Kniffen
2023-11-13 15:22:42 -06:00
parent 960182ecc3
commit 4c7f46c111
7 changed files with 37 additions and 45 deletions

View File

@@ -79,7 +79,7 @@ async function bridgeTransfer(): Promise<void> {
'Waiting for the attestation to go through... (usually 8-12 seconds)',
)
let ledgersWaited = 0
let initialBalance = '0'
let initialBalance = 0
while (ledgersWaited < MAX_LEDGERS_WAITED) {
await sleep(LEDGER_CLOSE_TIME)
try {
@@ -151,7 +151,7 @@ async function bridgeTransfer(): Promise<void> {
wallet2.classicAddress,
)
console.log(initialBalance, currentBalance)
if (parseFloat(currentBalance) > parseFloat(initialBalance)) {
if (currentBalance > initialBalance) {
console.log('Transfer is complete')
console.log(
`New balance of ${wallet2.classicAddress} is ${currentBalance} XRP`,