mirror of
https://github.com/Permissionless-Software-Foundation/bch-js.git
synced 2026-09-21 16:51:59 -07:00
fix(Ninsight): Using POST endpoint only
This commit is contained in:
+4
-1
@@ -68,8 +68,11 @@ class Ninsight {
|
|||||||
try {
|
try {
|
||||||
// Handle single address.
|
// Handle single address.
|
||||||
if (typeof address === "string") {
|
if (typeof address === "string") {
|
||||||
const response = await axios.get(
|
const response = await axios.post(
|
||||||
`${this.ninsightURL}/address/utxo/${address}`,
|
`${this.ninsightURL}/address/utxo/${address}`,
|
||||||
|
{
|
||||||
|
addresses: [address]
|
||||||
|
},
|
||||||
_this.axiosOptions
|
_this.axiosOptions
|
||||||
)
|
)
|
||||||
return response.data
|
return response.data
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ describe(`#Ninsight`, () => {
|
|||||||
|
|
||||||
it(`should GET utxos for a single address`, async () => {
|
it(`should GET utxos for a single address`, async () => {
|
||||||
// Stub the network call.
|
// Stub the network call.
|
||||||
sandbox.stub(axios, "get").resolves({ data: mockData.utxo })
|
sandbox.stub(axios, "post").resolves({ data: mockData.utxo })
|
||||||
|
|
||||||
const addr = "bitcoincash:qqh793x9au6ehvh7r2zflzguanlme760wuzehgzjh9"
|
const addr = "bitcoincash:qqh793x9au6ehvh7r2zflzguanlme760wuzehgzjh9"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user