From d26577acee1b516f4ccbe54acf3e812350b719a1 Mon Sep 17 00:00:00 2001 From: Dmytro Date: Sun, 24 Mar 2024 16:20:54 +0000 Subject: [PATCH 1/2] Update error handling in sendTransaction --- src/core/constants.ts | 1 + src/core/transactions.ts | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/core/constants.ts b/src/core/constants.ts index cbdaf16..34a30e7 100644 --- a/src/core/constants.ts +++ b/src/core/constants.ts @@ -45,6 +45,7 @@ export const DEFAULT_MIN_SFUEL_WEI = 21000000000000n export const DEFAULT_ERC20_DECIMALS = '18' export const DEFAULT_ERROR_MSG = 'Ooops... Something went wrong...' export const TRANSFER_ERROR_MSG = 'Error during the transfer' +export const TRANSACTION_ERROR_MSG = 'Transaction sending failed' export const DEFAULT_MP_MARGIN = '20pt' export const DEFAULT_MP_Z_INDEX = 99000 diff --git a/src/core/transactions.ts b/src/core/transactions.ts index 72b27e8..c815f0c 100644 --- a/src/core/transactions.ts +++ b/src/core/transactions.ts @@ -22,7 +22,7 @@ */ import { type TransactionResponse } from 'ethers'; -import { TRANSFER_ERROR_MSG } from './constants' +import { TRANSACTION_ERROR_MSG } from './constants' import { TxResponse } from './interfaces' @@ -38,8 +38,10 @@ export async function sendTransaction(func: any, args: any[]): Promise Date: Sun, 24 Mar 2024 17:11:44 +0000 Subject: [PATCH 2/2] Update bun.lock file after bun i --- bun.lockb | Bin 616289 -> 616265 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/bun.lockb b/bun.lockb index ae60204cbe823a8ce93cc41afac035e33d20188c..734408928bfe027e1ffe84ff3911209eca4baaa2 100755 GIT binary patch delta 14947 zcmXxo3A|(D{m1b;V{XP8#u8MUwpyub8*5Xvf|l4ri&z_Di?M}Tf+80)GS=90Efst0 zQCp^#rj|CfhN4kMgD$a@pi9st{=et@`TfspPTtS+$&=-t(1Pd=iUnvxY)8c+bRfQyVhOsC$SRhh2g#ikE6|73E{atc zK>CM@H5fwXM~Zb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