Skip to content

Commit

Permalink
Special case the usdt-trc20 uri prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
peachbits committed Jul 16, 2024
1 parent 2d9678b commit 72f3896
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- changed: (Tron) Special case the `usdt-trc20` uri prefix

## 4.12.2 (2024-07-15)

- fixed: FIO payment wallet connection error, using a temporary workaround while FIO resolves the issue with their network
Expand Down
5 changes: 4 additions & 1 deletion src/tron/TronTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export class TronTools implements EdgeCurrencyTools {
currencyCode?: string,
customTokens?: EdgeMetaToken[]
): Promise<EdgeParsedUri> {
const networks = { [this.currencyInfo.pluginId]: true }
const networks = { [this.currencyInfo.pluginId]: true, 'usdt-trc20': true }
const { smartPayPublicAddress, smartPayUserId } = this.initOptions

const { parsedUri, edgeParsedUri } = parseUriCommon(
Expand All @@ -141,6 +141,9 @@ export class TronTools implements EdgeCurrencyTools {
currencyCode ?? this.currencyInfo.currencyCode,
customTokens
)
if (parsedUri.protocol === 'usdt-trc20') {
edgeParsedUri.currencyCode = 'USDT'
}
const address = edgeParsedUri.publicAddress ?? ''

if (isAddressValid(address)) {
Expand Down

0 comments on commit 72f3896

Please sign in to comment.