@b3dotfun/sdk 0.0.40-alpha.0 → 0.0.40-alpha.1
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/dist/cjs/anyspend/utils/chain.js +1 -1
- package/dist/cjs/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +5 -2
- package/dist/esm/anyspend/utils/chain.js +1 -1
- package/dist/esm/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +5 -2
- package/package.json +1 -1
- package/src/anyspend/utils/chain.ts +1 -1
- package/src/global-account/react/hooks/useUnifiedChainSwitchAndExecute.ts +5 -2
|
@@ -127,7 +127,7 @@ exports.EVM_MAINNET = {
|
|
|
127
127
|
name: chains_1.bsc.name,
|
|
128
128
|
logoUrl: "https://avatars.githubusercontent.com/u/45615063?s=280&v=4",
|
|
129
129
|
type: chain_1.ChainType.EVM,
|
|
130
|
-
nativeRequired: (0, viem_1.parseEther)("0.
|
|
130
|
+
nativeRequired: (0, viem_1.parseEther)("0.0001"),
|
|
131
131
|
canDepositNative: true,
|
|
132
132
|
defaultToken: (0, token_1.getBnbToken)(),
|
|
133
133
|
nativeToken: (0, token_1.getBnbToken)(),
|
|
@@ -130,18 +130,21 @@ function useUnifiedChainSwitchAndExecute() {
|
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
catch (err) {
|
|
133
|
-
console.error(err);
|
|
133
|
+
console.error("Create global-accounts-intents error", err);
|
|
134
134
|
}
|
|
135
135
|
sonner_1.toast.info("Sending transaction…");
|
|
136
|
+
const start = performance.now();
|
|
136
137
|
const sendTxResponse = await (0, thirdweb_2.sendTransaction)({
|
|
137
138
|
account: aaAccount,
|
|
138
139
|
transaction,
|
|
139
140
|
});
|
|
141
|
+
const end = performance.now();
|
|
142
|
+
console.log("Time taken to send transaction", end - start);
|
|
140
143
|
sonner_1.toast.success("Transaction sent successfully");
|
|
141
144
|
return sendTxResponse.transactionHash;
|
|
142
145
|
}
|
|
143
146
|
catch (err) {
|
|
144
|
-
console.error(err);
|
|
147
|
+
console.error("Send transaction error", err);
|
|
145
148
|
sonner_1.toast.error(err?.message ?? "Transaction failed");
|
|
146
149
|
return undefined;
|
|
147
150
|
}
|
|
@@ -104,7 +104,7 @@ export const EVM_MAINNET = {
|
|
|
104
104
|
name: bsc.name,
|
|
105
105
|
logoUrl: "https://avatars.githubusercontent.com/u/45615063?s=280&v=4",
|
|
106
106
|
type: ChainType.EVM,
|
|
107
|
-
nativeRequired: parseEther("0.
|
|
107
|
+
nativeRequired: parseEther("0.0001"),
|
|
108
108
|
canDepositNative: true,
|
|
109
109
|
defaultToken: getBnbToken(),
|
|
110
110
|
nativeToken: getBnbToken(),
|
|
@@ -124,18 +124,21 @@ export function useUnifiedChainSwitchAndExecute() {
|
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
126
|
catch (err) {
|
|
127
|
-
console.error(err);
|
|
127
|
+
console.error("Create global-accounts-intents error", err);
|
|
128
128
|
}
|
|
129
129
|
toast.info("Sending transaction…");
|
|
130
|
+
const start = performance.now();
|
|
130
131
|
const sendTxResponse = await twSendTransaction({
|
|
131
132
|
account: aaAccount,
|
|
132
133
|
transaction,
|
|
133
134
|
});
|
|
135
|
+
const end = performance.now();
|
|
136
|
+
console.log("Time taken to send transaction", end - start);
|
|
134
137
|
toast.success("Transaction sent successfully");
|
|
135
138
|
return sendTxResponse.transactionHash;
|
|
136
139
|
}
|
|
137
140
|
catch (err) {
|
|
138
|
-
console.error(err);
|
|
141
|
+
console.error("Send transaction error", err);
|
|
139
142
|
toast.error(err?.message ?? "Transaction failed");
|
|
140
143
|
return undefined;
|
|
141
144
|
}
|
package/package.json
CHANGED
|
@@ -149,7 +149,7 @@ export const EVM_MAINNET: Record<number, IEVMChain> = {
|
|
|
149
149
|
name: bsc.name,
|
|
150
150
|
logoUrl: "https://avatars.githubusercontent.com/u/45615063?s=280&v=4",
|
|
151
151
|
type: ChainType.EVM,
|
|
152
|
-
nativeRequired: parseEther("0.
|
|
152
|
+
nativeRequired: parseEther("0.0001"),
|
|
153
153
|
canDepositNative: true,
|
|
154
154
|
defaultToken: getBnbToken(),
|
|
155
155
|
nativeToken: getBnbToken(),
|
|
@@ -154,19 +154,22 @@ export function useUnifiedChainSwitchAndExecute() {
|
|
|
154
154
|
value: params.value.toString(),
|
|
155
155
|
});
|
|
156
156
|
} catch (err: any) {
|
|
157
|
-
console.error(err);
|
|
157
|
+
console.error("Create global-accounts-intents error", err);
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
toast.info("Sending transaction…");
|
|
161
|
+
const start = performance.now();
|
|
161
162
|
const sendTxResponse = await twSendTransaction({
|
|
162
163
|
account: aaAccount,
|
|
163
164
|
transaction,
|
|
164
165
|
});
|
|
166
|
+
const end = performance.now();
|
|
167
|
+
console.log("Time taken to send transaction", end - start);
|
|
165
168
|
|
|
166
169
|
toast.success("Transaction sent successfully");
|
|
167
170
|
return sendTxResponse.transactionHash;
|
|
168
171
|
} catch (err: any) {
|
|
169
|
-
console.error(err);
|
|
172
|
+
console.error("Send transaction error", err);
|
|
170
173
|
toast.error(err?.message ?? "Transaction failed");
|
|
171
174
|
return undefined;
|
|
172
175
|
} finally {
|