@instadapp/avocado-base 0.0.74 → 0.0.76

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.
@@ -36,5 +36,5 @@ defineProps<{
36
36
  <InstadappProSVG v-else-if="action === 'instadapp-pro'"/>
37
37
  <PermitSignSVG v-else-if="action === 'permit2'"/>
38
38
  <UpgradeSVG v-else-if="action === 'upgrade'"/>
39
- <HammerSVG v-else-if="action === 'transaction-builder'"/>
39
+ <HammerSVG v-else-if="action === 'tx-builder'"/>
40
40
  </template>
@@ -53,8 +53,10 @@ provide('tokens', props.tokens);
53
53
  {{ chainIdToName(metadata.chainId) }}
54
54
  </div>
55
55
  </div>
56
- <div v-if="metadata.type === 'transaction-builder'" class="self-start capitalize flex gap-3">
57
- Transaction Builder ({{ metadata?.actionCount }} actions)
56
+ <div v-if="metadata.type === 'tx-builder'" class="self-start capitalize flex gap-3">
57
+ <span v-if="!compact">
58
+ Transaction Builder
59
+ </span> ({{ metadata?.actionCount }} {{ toBN(metadata?.actionCount).lt(2) ? 'action' : 'actions' }})
58
60
  </div>
59
61
  <div v-if="metadata.type === 'instadapp-pro'" class="self-start capitalize flex gap-3">
60
62
  Instadapp Pro |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instadapp/avocado-base",
3
- "version": "0.0.74",
3
+ "version": "0.0.76",
4
4
  "type": "module",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "global.d.ts",
package/utils/metadata.ts CHANGED
@@ -19,7 +19,7 @@ export const MetadataEnums = {
19
19
  "remove-signers": "remove-signers",
20
20
  "change-threshold": "change-threshold",
21
21
  import: "import",
22
- "transaction-builder": "transaction-builder",
22
+ "tx-builder": "tx-builder",
23
23
  } as const;
24
24
 
25
25
  const multiMetadataTypes = ["bytes[]"];
@@ -58,7 +58,7 @@ const actionMetadataTypes: Record<MetadataTypes, string[]> = {
58
58
  import: ["bytes32 protocol", "uint256 valueInUsd"],
59
59
  auth: ["address address", "uint256 chainId", "bool remove"],
60
60
  deploy: [],
61
- "transaction-builder": ["bytes32 actionCount"],
61
+ "tx-builder": ["bytes32 actionCount"],
62
62
  permit2: [
63
63
  "address token",
64
64
  "address spender",
@@ -182,12 +182,12 @@ export const encodeTransactionBuilderMetadata = (
182
182
  single = true
183
183
  ) => {
184
184
  const encodedData = ethers.utils.defaultAbiCoder.encode(
185
- actionMetadataTypes["transaction-builder"],
185
+ actionMetadataTypes["tx-builder"],
186
186
  [actionCount]
187
187
  );
188
188
 
189
189
  const data = encodeMetadata({
190
- type: MetadataEnums["transaction-builder"],
190
+ type: MetadataEnums["tx-builder"],
191
191
  encodedData,
192
192
  });
193
193
 
@@ -476,9 +476,9 @@ const typesPayload: IPayload = {
476
476
  deploy: (data, type) => ({
477
477
  type,
478
478
  }),
479
- "transaction-builder": (data, type) => ({
479
+ "tx-builder": (data, type) => ({
480
480
  type,
481
- actionCount: data.actionCount ? toBN(data.actionCount).toNumber() : 0,
481
+ actionCount: utils.parseBytes32String(data.actionCount || ""),
482
482
  }),
483
483
  permit2: (data, type) => ({
484
484
  type,
package/utils/network.ts CHANGED
@@ -269,27 +269,27 @@ export const networks: Network[] = [
269
269
  },
270
270
  },
271
271
  },
272
- // {
273
- // name: "Fuse",
274
- // chainId: 122,
275
- // zerionName: "fuse",
276
- // color: "#78d64b",
277
- // explorerUrl: "https://explorer.fuse.io",
278
- // get serverRpcUrl() {
279
- // return process.env?.FUSE_RPC_URL || this.params.rpcUrls[0];
280
- // },
281
- // usdcAddress: "",
282
- // balanceResolverAddress: "0xdF19Da523DA64bBE82eE0E4DFf00d676A8386474",
283
- // params: {
284
- // rpcUrls: ["https://fuse-mainnet.chainstacklabs.com"],
285
- // chainName: "Fuse",
286
- // nativeCurrency: {
287
- // decimals: 18,
288
- // name: "Fuse",
289
- // symbol: "fuse",
290
- // },
291
- // },
292
- // },
272
+ {
273
+ name: "Fuse",
274
+ chainId: 122,
275
+ zerionName: "fuse",
276
+ color: "#78d64b",
277
+ explorerUrl: "https://explorer.fuse.io",
278
+ get serverRpcUrl() {
279
+ return process.env?.FUSE_RPC_URL || this.params.rpcUrls[0];
280
+ },
281
+ usdcAddress: "",
282
+ balanceResolverAddress: "0xdF19Da523DA64bBE82eE0E4DFf00d676A8386474",
283
+ params: {
284
+ rpcUrls: ["https://fuse-mainnet.chainstacklabs.com"],
285
+ chainName: "Fuse",
286
+ nativeCurrency: {
287
+ decimals: 18,
288
+ name: "Fuse",
289
+ symbol: "fuse",
290
+ },
291
+ },
292
+ },
293
293
  {
294
294
  name: AVO_PROD_CHAIN_NAME,
295
295
  chainId: AVO_PROD_CHAIN_ID,