Skip to content

Commit

Permalink
update address url (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
thedoublejay authored Aug 4, 2021
1 parent f0ff661 commit e9d9d72
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions cypress/integration/functional/balances/send.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { WhaleApiClient } from '@defichain/whale-api-client'
import BigNumber from 'bignumber.js'

context('wallet/send', () => {
Expand Down Expand Up @@ -84,16 +85,12 @@ context('wallet/send', () => {
})

it(`should check if exist on other side ${address}`, function () {
// TODO(jj): we should inject a WhaleClient into cypress global for operations
// such as this as versioning is automatically handled there
let url: string
if (network === 'Playground') {
url = 'https://playground.defichain.com/v0.8/regtest'
} else {
url = 'http://localhost:19553/v0.8/regtest'
}
cy.request(`${url}/address/${address}/balance`).then((response) => {
expect(response.body).to.have.property('data', '1.00000000')
const whale = new WhaleApiClient({
url: network === 'Playground' ? 'https://playground.defichain.com' : 'http://localhost:19553',
network: 'regtest'
})
cy.wrap(whale.address.getBalance(address)).then((response) => {
expect(response).eq('1.00000000')
})
})

Expand Down

0 comments on commit e9d9d72

Please sign in to comment.