Skip to content

Commit

Permalink
chore: removed test rpc lib
Browse files Browse the repository at this point in the history
  • Loading branch information
andreabadesso committed Feb 20, 2025
1 parent 80ab921 commit bebc7f3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
8 changes: 2 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"../hathor-rpc-lib/packages/hathor-rpc-handler/node_modules/bitcore-lib": "8.25.10"
},
"dependencies": {
"@hathor/hathor-rpc-handler": "file:../hathor-rpc-lib/packages/hathor-rpc-handler",
"@hathor/wallet-lib": "2.0.1",
"@ledgerhq/hw-transport-node-hid": "6.28.1",
"@reduxjs/toolkit": "2.2.3",
Expand Down
15 changes: 9 additions & 6 deletions src/components/Reown/modals/SendTransactionModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export function SendTransactionModal({ data, firstAddress, onAccept, onReject })
}
});

console.log('unregistered tokens: ', unregisteredTokens);
if (unregisteredTokens.size > 0) {
dispatch(unregisteredTokensDownloadRequested(Array.from(unregisteredTokens)));
}
Expand All @@ -48,24 +47,28 @@ export function SendTransactionModal({ data, firstAddress, onAccept, onReject })
if (token) {
return token.symbol;
}

// If not found, check in metadata
const metadata = tokenMetadata[tokenId];
if (metadata) {
return metadata.symbol;
}

// If not found anywhere, return first 4 chars of token ID
return tokenId ? tokenId.slice(0, 4) : 'HTR';
return tokenId.slice(0, 4);
};

const formatValue = (value) => {
if (!value) return '0';
if (value == null) {
return '-';
}

return numberUtils.prettyValue(value);
};

const truncateTxId = (txId) => {
if (!txId) return '';
if (txId.length <= 16) return txId;
return `${txId.slice(0, 8)}....${txId.slice(-8)}`;
if (!txId) return '-';
return `${txId.slice(0, 8)}...${txId.slice(-8)}`;
};

const renderInputs = () => {
Expand Down
1 change: 0 additions & 1 deletion src/sagas/reown.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ export function* processRequest(action) {
dispatch = _dispatch;
});

console.log('; Got request: ', params.request);
const response = yield call(
handleRpcRequest,
params.request,
Expand Down

0 comments on commit bebc7f3

Please sign in to comment.