Skip to content

Commit

Permalink
Merge pull request #130 from CityOfZion/CU-86a5yr6db
Browse files Browse the repository at this point in the history
CU-86a5yr6db-BS Lib - Swaps - Update Dora endpoint to use coz dns
  • Loading branch information
thiagocbalducci authored Dec 19, 2024
2 parents 466d691 + 92950b0 commit a4f755d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@cityofzion/bs-swap",
"comment": "Update Swap Dora URL",
"type": "patch"
}
],
"packageName": "@cityofzion/bs-swap"
}
4 changes: 2 additions & 2 deletions packages/bs-swap/src/__tests__/SimpleSwapService.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ let accountToUse: SwapServiceValidateValue<Account<'neo3'>>
let error: string | undefined

describe('SimpleSwapService', () => {
beforeEach(async () => {
beforeEach(() => {
jest.clearAllMocks()

error = undefined
Expand Down Expand Up @@ -110,7 +110,7 @@ describe('SimpleSwapService', () => {
}),
]),
})
})
}, 10000)

it('Should be able to set the token to use to null', async () => {
await simpleSwapService.init()
Expand Down
2 changes: 1 addition & 1 deletion packages/bs-swap/src/apis/SimpleSwapApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class SimpleSwapApi<BSName extends string = string> {
#allCurrenciesMap: Map<string, SimpleSwapApiCurrency<BSName>> = new Map()

constructor() {
this.#axios = axios.create({ baseURL: 'https://4b6s1fv9b6.execute-api.us-east-1.amazonaws.com/Prod' })
this.#axios = axios.create({ baseURL: 'https://dora.coz.io/api/v2/swap' })
}

#getTokenFromCurrency(
Expand Down
1 change: 1 addition & 0 deletions packages/bs-swap/src/services/SimpleSwapService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ export class SimpleSwapService<BSName extends string = string> implements SwapSe
this.#tokenToReceive = { value: null }
this.#amountToUseMinMax = { value: null }
this.#amountToReceive = { value: null }
this.#addressToReceive = { value: null, valid: null }
throw error
}
}
Expand Down

0 comments on commit a4f755d

Please sign in to comment.