From 8a0febfc80d2bbd3e9983e4aacb14ac08d779492 Mon Sep 17 00:00:00 2001 From: peachbits Date: Mon, 4 Sep 2023 15:36:19 -0700 Subject: [PATCH] fixup! Break out piratechain into its own implementation --- src/piratechain/PiratechainTools.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/piratechain/PiratechainTools.ts b/src/piratechain/PiratechainTools.ts index 37998f448..daa818261 100644 --- a/src/piratechain/PiratechainTools.ts +++ b/src/piratechain/PiratechainTools.ts @@ -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, @@ -191,7 +191,7 @@ export class PiratechainTools implements EdgeCurrencyTools { async encodeUri( obj: EdgeEncodeUri, - customTokens?: EdgeMetaToken[] + customTokens: EdgeMetaToken[] = [] ): Promise { const { pluginId } = this.currencyInfo const { nativeAmount, currencyCode, publicAddress } = obj @@ -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) {