Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/sdk-coin-evm/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ async function queryAddressBalanceHedera(
baseUrl: string
): Promise<Record<string, unknown>> {
const address = query.address;
const url = `${baseUrl}/accounts/${address}`;
const url = `${baseUrl}/accounts/${address}?transactions=false`;
const response = await request.get(url).send();

if (!response.ok) {
Expand All @@ -106,7 +106,7 @@ async function queryAddressBalanceHedera(
*/
async function getAddressNonceHedera(query: Record<string, string>, baseUrl: string): Promise<Record<string, unknown>> {
const address = query.address;
const accountUrl = `${baseUrl}/accounts/${address}`;
const accountUrl = `${baseUrl}/accounts/${address}?transactions=false`;
const response = await request.get(accountUrl).send();

if (!response.ok) {
Expand Down
18 changes: 9 additions & 9 deletions modules/sdk-coin-evm/test/unit/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('EVM Coin Utils', function () {
},
};

nock(mockExplorerUrl).get(`/accounts/${mockAddress}`).reply(200, mockResponse);
nock(mockExplorerUrl).get(`/accounts/${mockAddress}?transactions=false`).reply(200, mockResponse);

const result = await recovery_HBAREVM_BlockchainExplorerQuery(query, mockRpcUrl, mockExplorerUrl, mockToken);

Expand All @@ -49,7 +49,7 @@ describe('EVM Coin Utils', function () {

const mockResponse = {};

nock(mockExplorerUrl).get(`/accounts/${mockAddress}`).reply(200, mockResponse);
nock(mockExplorerUrl).get(`/accounts/${mockAddress}?transactions=false`).reply(200, mockResponse);

const result = await recovery_HBAREVM_BlockchainExplorerQuery(query, mockRpcUrl, mockExplorerUrl, mockToken);

Expand All @@ -64,7 +64,7 @@ describe('EVM Coin Utils', function () {
address: mockAddress,
};

nock(mockExplorerUrl).get(`/accounts/${mockAddress}`).reply(500, 'Internal Server Error');
nock(mockExplorerUrl).get(`/accounts/${mockAddress}?transactions=false`).reply(500, 'Internal Server Error');

try {
await recovery_HBAREVM_BlockchainExplorerQuery(query, mockRpcUrl, mockExplorerUrl, mockToken);
Expand All @@ -88,7 +88,7 @@ describe('EVM Coin Utils', function () {
ethereum_nonce: 42,
};

nock(mockExplorerUrl).get(`/accounts/${mockAddress}`).reply(200, mockResponse);
nock(mockExplorerUrl).get(`/accounts/${mockAddress}?transactions=false`).reply(200, mockResponse);

const result = await recovery_HBAREVM_BlockchainExplorerQuery(query, mockRpcUrl, mockExplorerUrl, mockToken);

Expand All @@ -105,7 +105,7 @@ describe('EVM Coin Utils', function () {

const mockResponse = {};

nock(mockExplorerUrl).get(`/accounts/${mockAddress}`).reply(200, mockResponse);
nock(mockExplorerUrl).get(`/accounts/${mockAddress}?transactions=false`).reply(200, mockResponse);

const result = await recovery_HBAREVM_BlockchainExplorerQuery(query, mockRpcUrl, mockExplorerUrl, mockToken);

Expand Down Expand Up @@ -331,7 +331,7 @@ describe('EVM Coin Utils', function () {
};

nock(mockExplorerUrl) // Note: nock should match without trailing slash
.get(`/accounts/${mockAddress}`)
.get(`/accounts/${mockAddress}?transactions=false`)
.reply(200, mockResponse);

const result = await recovery_HBAREVM_BlockchainExplorerQuery(
Expand Down Expand Up @@ -362,7 +362,7 @@ describe('EVM Coin Utils', function () {
},
};

nock(mockExplorerUrl).get(`/accounts/${mockAddress}`).reply(200, mockResponse);
nock(mockExplorerUrl).get(`/accounts/${mockAddress}?transactions=false`).reply(200, mockResponse);

const result = await recovery_HBAREVM_BlockchainExplorerQuery(query, mockRpcUrl, mockExplorerUrl, mockToken);

Expand All @@ -389,7 +389,7 @@ describe('EVM Coin Utils', function () {
},
};

nock(mockExplorerUrl).get(`/accounts/${mockAddress}`).reply(200, mockResponse);
nock(mockExplorerUrl).get(`/accounts/${mockAddress}?transactions=false`).reply(200, mockResponse);

const result = await recovery_HBAREVM_BlockchainExplorerQuery(query, mockRpcUrl, mockExplorerUrl, mockToken);

Expand All @@ -410,7 +410,7 @@ describe('EVM Coin Utils', function () {
},
};

nock(mockExplorerUrl).get(`/accounts/${mockAddress}`).reply(200, mockResponse);
nock(mockExplorerUrl).get(`/accounts/${mockAddress}?transactions=false`).reply(200, mockResponse);

const result = await recovery_HBAREVM_BlockchainExplorerQuery(query, mockRpcUrl, mockExplorerUrl, mockToken);

Expand Down
1 change: 1 addition & 0 deletions modules/statics/src/allCoinsAndTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2145,6 +2145,7 @@ export const allCoinsAndTokens = [
CoinFeature.EVM_COMPATIBLE_WP,
CoinFeature.EVM_NON_BITGO_RECOVERY,
CoinFeature.EVM_UNSIGNED_SWEEP_RECOVERY,
CoinFeature.SUPPORTS_ERC20,
]
),
account(
Expand Down