Initial commit: USDT transfer worker (RabbitMQ + Postgres + Vault)
This commit is contained in:
19
tests/gasErrorMessage.test.ts
Normal file
19
tests/gasErrorMessage.test.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { describe, it } from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { humanizeTransferError } from "../src/ethereum/EthersEthereumGateway.js";
|
||||
|
||||
void describe("humanizeTransferError", () => {
|
||||
void it("translates low gas price into a readable error", () => {
|
||||
const message = humanizeTransferError({
|
||||
message: "missing revert data",
|
||||
info: {
|
||||
error: {
|
||||
message:
|
||||
"failed with 3080732 gas: max fee per gas less than block base fee: address 0xabc, maxFeePerGas: 960000000, baseFee: 1575278655"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
assert.match(message, /Transfer fee 0.96 gwei is below current base fee 1.575278655 gwei/);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user