Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"@types/node-fetch": "2.x",
"@types/request": "^2.48.7",
"@types/url-parse": "^1.4.3",
"@types/utf8": "^3.0.1",
"@types/ws": "^7.2.6",
"@typescript-eslint/eslint-plugin": "^4.8.2",
"@typescript-eslint/parser": "^4.8.2",
Expand All @@ -75,7 +76,7 @@
"buffer": "^6.0.3",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"edge-core-js": "^0.19.33",
"edge-core-js": "^0.19.36",
"eslint": "^7.14.0",
"eslint-config-standard-kit": "0.15.1",
"eslint-plugin-flowtype": "^5.2.0",
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { makeEdgeRatesPlugin } from './rate/edgeRates'
import { makeNomicsPlugin } from './rate/nomics'
import { makeWazirxPlugin } from './rate/wazirx'
import { makeChangeHeroPlugin } from './swap/changehero'
import { makeChangellyPlugin } from './swap/changelly'
import { makeChangeNowPlugin } from './swap/changenow'
import { makeThorchainPlugin } from './swap/defi/thorchain'
import { makeThorchainDaPlugin } from './swap/defi/thorchainDa'
Expand Down Expand Up @@ -39,6 +40,7 @@ const edgeCorePlugins = {

// Swap plugins:
changehero: makeChangeHeroPlugin,
changelly: makeChangellyPlugin,
changenow: makeChangeNowPlugin,
exolix: makeExolixPlugin,
godex: makeGodexPlugin,
Expand Down
10 changes: 2 additions & 8 deletions src/swap/changehero.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,12 @@ const asCreateFixTransactionReply = asObject({
})
})

const dontUseLegacy: { [cc: string]: boolean } = {
DGB: true
}

async function getAddress(
wallet: EdgeCurrencyWallet,
currencyCode: string
): Promise<string> {
const addressInfo = await wallet.getReceiveAddress({ currencyCode })
return addressInfo.legacyAddress != null && !dontUseLegacy[currencyCode]
? addressInfo.legacyAddress
: addressInfo.publicAddress
const { publicAddress } = await wallet.getReceiveAddress({ currencyCode })
return publicAddress
}

function checkReply(
Expand Down
Loading