@exodus/ethereum-api 2.25.3 → 2.26.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-api",
3
- "version": "2.25.3",
3
+ "version": "2.26.0",
4
4
  "description": "Ethereum Api",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -34,5 +34,5 @@
34
34
  "devDependencies": {
35
35
  "@exodus/models": "^8.7.2"
36
36
  },
37
- "gitHead": "5fc9011ce93fad50a48bccb4ab25930dbf7d762b"
37
+ "gitHead": "c7534c623d4c2abb024d2c983399130ddb3b434f"
38
38
  }
@@ -126,7 +126,7 @@ async function tryToDecodeApprovalTransaction(transaction) {
126
126
  }
127
127
  }
128
128
 
129
- export async function simulateAndRetrieveSideEffects(transaction, assetName) {
129
+ export async function retrieveSideEffects({ transaction, assetName, shouldSimulate = true }) {
130
130
  const willSend = []
131
131
  const willReceive = []
132
132
 
@@ -135,6 +135,10 @@ export async function simulateAndRetrieveSideEffects(transaction, assetName) {
135
135
  return { willApprove: approveTransactionData }
136
136
  }
137
137
 
138
+ if (!shouldSimulate) {
139
+ return null
140
+ }
141
+
138
142
  if (!transaction.to) throw new Error(`'to' field is missing in the TX object`)
139
143
 
140
144
  const blocknativeTxObject = {