Merge pull request #9 from Permissionless-Software-Foundation/ct-unstable

fix(Ninsight): Using POST endpoint only
This commit is contained in:
Chris Troutner
2020-07-31 14:07:28 -07:00
committed by GitHub
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -68,8 +68,11 @@ class Ninsight {
try {
// Handle single address.
if (typeof address === "string") {
const response = await axios.get(
const response = await axios.post(
`${this.ninsightURL}/address/utxo/${address}`,
{
addresses: [address]
},
_this.axiosOptions
)
return response.data
+1 -1
View File
@@ -31,7 +31,7 @@ describe(`#Ninsight`, () => {
it(`should GET utxos for a single address`, async () => {
// Stub the network call.
sandbox.stub(axios, "get").resolves({ data: mockData.utxo })
sandbox.stub(axios, "post").resolves({ data: mockData.utxo })
const addr = "bitcoincash:qqh793x9au6ehvh7r2zflzguanlme760wuzehgzjh9"