mirror of
https://github.com/Permissionless-Software-Foundation/ipfs-bch-wallet-consumer.git
synced 2026-09-22 17:22:03 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00b76226ec | ||
|
|
f0552bce32 | ||
|
|
4aa7de253d |
@@ -211,6 +211,8 @@ class BchAdapter {
|
||||
// Query the UTXOs associated with an array of up to 20 addresses.
|
||||
async getUtxosBulk (addrs) {
|
||||
try {
|
||||
// console.log('getUtxosBulk() addrs: ', addrs)
|
||||
|
||||
// Throw an error if this IPFS node has not yet made a connection to a
|
||||
// wallet service provider.
|
||||
const selectedProvider =
|
||||
@@ -229,7 +231,7 @@ class BchAdapter {
|
||||
|
||||
const rpcData = {
|
||||
endpoint: 'utxosBulk',
|
||||
address: addrs
|
||||
addresses: addrs
|
||||
}
|
||||
|
||||
// Generate a UUID for the call.
|
||||
@@ -250,7 +252,7 @@ class BchAdapter {
|
||||
|
||||
// Wait for data to come back from the wallet service.
|
||||
const data = await this.waitForRPCResponse(rpcId)
|
||||
// console.log(`data: ${JSON.stringify(data, null, 2)}`)
|
||||
// console.log(`getUtxosBulk() data: ${JSON.stringify(data, null, 2)}`)
|
||||
|
||||
return data
|
||||
} catch (err) {
|
||||
|
||||
@@ -325,7 +325,7 @@ class BchRESTControllerLib {
|
||||
const utxos = await this.adapters.bch.getUtxosBulk(addrs)
|
||||
// console.log(`utxos: ${JSON.stringify(utxos, null, 2)}`)
|
||||
|
||||
ctx.body = [utxos]
|
||||
ctx.body = utxos
|
||||
} catch (err) {
|
||||
this.handleError(ctx, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user