@atomiqlabs/chain-evm 1.0.0-dev.85 → 1.0.0-dev.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -101,8 +101,14 @@ class EVMPersistentSigner extends EVMSigner_1.EVMSigner {
101
101
  //Too big of an increase over the current fee rate, don't fee bump
102
102
  this.logger.debug("checkPastTransactions(): Tx yet unconfirmed but not increasing fee for ", lastTx.hash);
103
103
  await this.chainInterface.provider.broadcastTransaction(lastTx.serialized).catch(e => {
104
- if (e.code === "NONCE_EXPIRED")
104
+ if (e.code === "NONCE_EXPIRED") {
105
+ this.logger.debug("checkPastTransactions(): Tx re-broadcast success, tx already confirmed: ", lastTx.hash);
105
106
  return;
107
+ }
108
+ if (e.error?.message === "already known") {
109
+ this.logger.debug("checkPastTransactions(): Tx re-broadcast success, tx already known to the RPC: ", lastTx.hash);
110
+ return;
111
+ }
106
112
  this.logger.error("checkPastTransactions(): Tx re-broadcast error", e);
107
113
  });
108
114
  data.lastBumped = Date.now();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomiqlabs/chain-evm",
3
- "version": "1.0.0-dev.85",
3
+ "version": "1.0.0-dev.86",
4
4
  "description": "EVM specific base implementation",
5
5
  "main": "./dist/index.js",
6
6
  "types:": "./dist/index.d.ts",
@@ -163,7 +163,14 @@ export class EVMPersistentSigner extends EVMSigner {
163
163
  //Too big of an increase over the current fee rate, don't fee bump
164
164
  this.logger.debug("checkPastTransactions(): Tx yet unconfirmed but not increasing fee for ", lastTx.hash);
165
165
  await this.chainInterface.provider.broadcastTransaction(lastTx.serialized).catch(e => {
166
- if(e.code==="NONCE_EXPIRED") return;
166
+ if(e.code==="NONCE_EXPIRED") {
167
+ this.logger.debug("checkPastTransactions(): Tx re-broadcast success, tx already confirmed: ", lastTx.hash);
168
+ return;
169
+ }
170
+ if(e.error?.message==="already known") {
171
+ this.logger.debug("checkPastTransactions(): Tx re-broadcast success, tx already known to the RPC: ", lastTx.hash);
172
+ return;
173
+ }
167
174
  this.logger.error("checkPastTransactions(): Tx re-broadcast error", e)
168
175
  });
169
176
  data.lastBumped = Date.now();