Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: CityOfZion/blockchain-services
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: acb6714a2e264705dc87cf67f5ef4a61f9866b5a
Choose a base ref
..
head repository: CityOfZion/blockchain-services
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2f62471db2025fb09e6569c9478e844019e44f62
Choose a head ref
Showing with 3 additions and 3 deletions.
  1. +1 −1 packages/blockchain-service/src/functions.ts
  2. +1 −1 packages/bs-swap/src/apis/SimpleSwapApi.ts
  3. +1 −1 packages/bs-swap/src/services/SimpleSwapService.ts
2 changes: 1 addition & 1 deletion packages/blockchain-service/src/functions.ts
Original file line number Diff line number Diff line change
@@ -137,5 +137,5 @@ export async function fetchAccountsForBlockchainServices<BSName extends string =
}

export function normalizeHash(hash: string): string {
return hash.toLowerCase()
return hash.replace('0x', '').toLowerCase()
}
2 changes: 1 addition & 1 deletion packages/bs-swap/src/apis/SimpleSwapApi.ts
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ export class SimpleSwapApi<BSName extends string = string> {

const token = options.blockchainServicesByName[blockchain].tokens.find(
item =>
(hash && normalizeHash(hash) === item.hash) ||
(hash && normalizeHash(hash) === normalizeHash(item.hash)) ||
(currency.ticker && currency.ticker.toLowerCase().startsWith(item.symbol.toLowerCase()))
)

2 changes: 1 addition & 1 deletion packages/bs-swap/src/services/SimpleSwapService.ts
Original file line number Diff line number Diff line change
@@ -199,7 +199,7 @@ export class SimpleSwapService<BSName extends string = string> implements SwapSe
chainsByServiceName: this.#chainsByServiceName,
})

const filteredTokens = tokens.filter(token => token.blockchain && token.decimals === undefined && token.hash)
const filteredTokens = tokens.filter(token => token.blockchain && token.decimals !== undefined && token.hash)

this.#availableTokensToUse = { loading: false, value: filteredTokens }
}