diff --git a/src/piratechain/PiratechainEngine.ts b/src/piratechain/PiratechainEngine.ts index 92c7b0b91..e66b9ef88 100644 --- a/src/piratechain/PiratechainEngine.ts +++ b/src/piratechain/PiratechainEngine.ts @@ -3,6 +3,7 @@ import { EdgeCurrencyEngine, EdgeCurrencyEngineOptions, EdgeEnginePrivateKeyOptions, + EdgeMemo, EdgeSpendInfo, EdgeTransaction, EdgeWalletInfo, @@ -256,6 +257,14 @@ export class PiratechainEngine extends CurrencyEngine< ourReceiveAddresses.push(this.walletInfo.keys.publicKey) } + const memos: EdgeMemo[] = [] + if (tx.memo != null) { + memos.push({ + type: 'text', + value: tx.memo + }) + } + const edgeTransaction: EdgeTransaction = { txid: tx.rawTransactionId, date: tx.blockTimeInSeconds, @@ -263,7 +272,7 @@ export class PiratechainEngine extends CurrencyEngine< blockHeight: tx.minedHeight, nativeAmount: netNativeAmount, isSend: netNativeAmount.startsWith('-'), - memos: [], + memos, networkFee: this.networkInfo.defaultNetworkFee, ourReceiveAddresses, // blank if you sent money otherwise array of addresses that are yours in this transaction signedTx: '', diff --git a/src/zcash/ZcashEngine.ts b/src/zcash/ZcashEngine.ts index e99b970e4..0940c291c 100644 --- a/src/zcash/ZcashEngine.ts +++ b/src/zcash/ZcashEngine.ts @@ -4,6 +4,7 @@ import { EdgeCurrencyEngineOptions, EdgeEnginePrivateKeyOptions, EdgeFreshAddress, + EdgeMemo, EdgeSpendInfo, EdgeTransaction, EdgeWalletInfo, @@ -260,12 +261,20 @@ export class ZcashEngine extends CurrencyEngine< ourReceiveAddresses.push(this.walletInfo.keys.publicKey) } + const memos: EdgeMemo[] = [] + if (tx.memo != null) { + memos.push({ + type: 'text', + value: tx.memo + }) + } + const edgeTransaction: EdgeTransaction = { blockHeight: tx.minedHeight, currencyCode: this.currencyInfo.currencyCode, date: tx.blockTimeInSeconds, isSend: netNativeAmount.startsWith('-'), - memos: [], + memos, nativeAmount: netNativeAmount, networkFee: this.networkInfo.defaultNetworkFee, otherParams: {},