Skip to content

Commit b321dda

Browse files
authored
fix: gasprice of transactions denoted in tinybars (#2688)
* chore: fix formatter Signed-off-by: nikolay <[email protected]> * chore: fix expected test result Signed-off-by: nikolay <[email protected]> --------- Signed-off-by: nikolay <[email protected]>
1 parent a934c3c commit b321dda

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/relay/src/formatters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ const formatContractResult = (cr: any) => {
156156
cr.gas_price === null || cr.gas_price === '0x'
157157
? '0x0'
158158
: isHex(cr.gas_price)
159-
? cr.gas_price
159+
? numberTo0x(BigInt(cr.gas_price) * BigInt(constants.TINYBAR_TO_WEIBAR_COEF))
160160
: nanOrNumberTo0x(cr.gas_price);
161161

162162
const commonFields = {

packages/relay/tests/lib/eth/eth-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ export const DEFAULT_TRANSACTION = {
591591
chainId: '0x12a',
592592
from: `${defaultEvmAddress}`,
593593
gas: '0x7b',
594-
gasPrice: '0x4a817c80',
594+
gasPrice: '0xad78ebc5ac620000',
595595
hash: DEFAULT_TX_HASH,
596596
input: '0x0707',
597597
maxFeePerGas: null,

0 commit comments

Comments
 (0)