diff --git a/source/pages/Home/Panel/components/Transactions/List.tsx b/source/pages/Home/Panel/components/Transactions/List.tsx index 674830e56..3d3f625dc 100644 --- a/source/pages/Home/Panel/components/Transactions/List.tsx +++ b/source/pages/Home/Panel/components/Transactions/List.tsx @@ -39,18 +39,6 @@ export const TransactionsList = ({ const getTxType = (tx: any, isTxSent: boolean) => { if (isBitcoinBased) { - if (tx.tokenType === 'SPTAssetActivate') { - return 'SPT creation'; - } - - if (tx.tokenType === 'SPTAssetSend') { - return 'SPT mint'; - } - - if (tx.tokenType === 'SPTAssetUpdate') { - return 'SPT update'; - } - return 'Transaction'; } diff --git a/source/pages/Home/Panel/components/Transactions/utils/useTransactionsInfos.tsx b/source/pages/Home/Panel/components/Transactions/utils/useTransactionsInfos.tsx index 328222305..15727e6ad 100644 --- a/source/pages/Home/Panel/components/Transactions/utils/useTransactionsInfos.tsx +++ b/source/pages/Home/Panel/components/Transactions/utils/useTransactionsInfos.tsx @@ -20,18 +20,6 @@ export const useTransactionsListConfig = ( const getTxType = (tx: any, isTxSent: boolean) => { if (isBitcoinBased) { - if (tx.tokenType === 'SPTAssetActivate') { - return 'SPT creation'; - } - - if (tx.tokenType === 'SPTAssetSend') { - return 'SPT mint'; - } - - if (tx.tokenType === 'SPTAssetUpdate') { - return 'SPT update'; - } - return 'Transaction'; } diff --git a/source/pages/Send/SendSys.tsx b/source/pages/Send/SendSys.tsx index c5ca7d2a4..727f32174 100644 --- a/source/pages/Send/SendSys.tsx +++ b/source/pages/Send/SendSys.tsx @@ -390,9 +390,7 @@ export const SendSys = () => {

{item?.symbol}

- {isNFT(item.assetGuid) - ? 'NFT' - : 'SPT'} + {isNFT(item.assetGuid) && 'NFT'} diff --git a/source/scripts/ContentScript/inject/paliProviderSyscoin.ts b/source/scripts/ContentScript/inject/paliProviderSyscoin.ts index cdaee713b..b0813b904 100644 --- a/source/scripts/ContentScript/inject/paliProviderSyscoin.ts +++ b/source/scripts/ContentScript/inject/paliProviderSyscoin.ts @@ -36,6 +36,7 @@ export class PaliInpageProviderSys extends BaseProvider { public readonly version: number = 2; public networkVersion: string | null; public chainId: string | null; + constructor(maxEventListeners = 100, wallet = 'pali-v2') { super('syscoin', maxEventListeners, wallet); this._sys = this._getSysAPI(); @@ -250,6 +251,7 @@ export class PaliInpageProviderSys extends BaseProvider { private _handleActiveBlockExplorer(blockExplorerURL: string | null) { this._sysState.blockExplorerURL = blockExplorerURL; } + private _handleIsBitcoinBased({ isBitcoinBased, }: { @@ -257,9 +259,11 @@ export class PaliInpageProviderSys extends BaseProvider { }) { this._sysState.isBitcoinBased = isBitcoinBased; } + private _handleIsTestnet({ isTestnet }: { isTestnet: boolean }) { this._sysState.isTestnet = isTestnet; } + private async _isSyscoinChain(): Promise { let checkExplorer = false; try { @@ -324,51 +328,6 @@ export class PaliInpageProviderSys extends BaseProvider { const validated = _isNFT(guid); return validated; }, - /** - * Get the minted tokens by the current connected Xpub on UTXO chain. - * - * @returns Promise send back tokens data - */ - getUserMintedTokens: async () => { - const account = await this.request({ method: 'wallet_getAccount' }); - if (account) { - const { transactions } = account as any; - - const filteredTxs = transactions?.filter( - (tx: any) => tx.tokenType === 'SPTAssetActivate' - ); - - const allTokens = []; - - for (const txs of filteredTxs) { - for (const tokens of txs.tokenTransfers) { - if (tokens) { - allTokens.push(tokens); - } - } - } - - const txs = await Promise.all( - allTokens.map(async (t: any) => { - const assetInfo = await getAsset( - this._sysState.blockExplorerURL, - t.token - ); - const formattedAssetInfo = { - ...assetInfo, - symbol: Buffer.from( - String(assetInfo.symbol), - 'base64' - ).toString('utf-8'), - }; - if (formattedAssetInfo.assetGuid) return formattedAssetInfo; - }) - ); - - return txs.filter((item) => item !== undefined); - } - return []; - }, /** * Get held assets by current connected account on UTXO chain. *