Skip to content

Commit a48c393

Browse files
committed
fix: throw INTERNAL_ERROR for eth_gasPrice for missing gas fee from network
Signed-off-by: Logan Nguyen <[email protected]>
1 parent 73e81bd commit a48c393

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/relay/src/lib/services/ethService/ethCommonService/CommonService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ export class CommonService implements ICommonService {
458458
}
459459
}
460460

461-
throw predefined.COULD_NOT_SIMULATE_TRANSACTION('Failed to retrieve gas price from network fees');
461+
throw predefined.INTERNAL_ERROR('Failed to retrieve gas price from network fees');
462462
}
463463

464464
/**

packages/relay/tests/lib/eth/eth_gasPrice.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ describe('@ethGasPrice Gas Price spec', async function () {
8484

8585
restMock.onGet(`network/fees`).reply(200, JSON.stringify(partialNetworkFees));
8686
await RelayAssertions.assertRejection(
87-
predefined.COULD_NOT_SIMULATE_TRANSACTION('Failed to retrieve gas price from network fees'),
87+
predefined.INTERNAL_ERROR('Failed to retrieve gas price from network fees'),
8888
ethImpl.gasPrice,
8989
true,
9090
ethImpl,
@@ -140,7 +140,7 @@ describe('@ethGasPrice Gas Price spec', async function () {
140140

141141
it('eth_gasPrice with no network fees records found', async function () {
142142
await RelayAssertions.assertRejection(
143-
predefined.COULD_NOT_SIMULATE_TRANSACTION('Failed to retrieve gas price from network fees'),
143+
predefined.INTERNAL_ERROR('Failed to retrieve gas price from network fees'),
144144
ethImpl.gasPrice,
145145
true,
146146
ethImpl,

0 commit comments

Comments
 (0)