Skip to content

Commit

Permalink
fixup! Break out piratechain into its own implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
peachbits committed Sep 4, 2023
1 parent 02c0d0c commit 8a0febf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/piratechain/PiratechainTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
import { PluginEnvironment } from '../common/innerPlugin'
import { asIntegerString } from '../common/types'
import { encodeUriCommon, parseUriCommon } from '../common/uriHelpers'
import { getDenomInfo } from '../common/utils'
import { getLegacyDenomination } from '../common/utils'
import {
asArrrPublicKey,
asPiratechainPrivateKeys,
Expand Down Expand Up @@ -191,7 +191,7 @@ export class PiratechainTools implements EdgeCurrencyTools {

async encodeUri(
obj: EdgeEncodeUri,
customTokens?: EdgeMetaToken[]
customTokens: EdgeMetaToken[] = []
): Promise<string> {
const { pluginId } = this.currencyInfo
const { nativeAmount, currencyCode, publicAddress } = obj
Expand All @@ -202,9 +202,9 @@ export class PiratechainTools implements EdgeCurrencyTools {

let amount
if (nativeAmount != null) {
const denom = getDenomInfo(
this.currencyInfo,
const denom = getLegacyDenomination(
currencyCode ?? this.currencyInfo.currencyCode,
this.currencyInfo,
customTokens
)
if (denom == null) {
Expand Down

0 comments on commit 8a0febf

Please sign in to comment.