@huma-finance/widgets 0.0.75-beta.973 → 0.0.75-beta.975
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/index.js +29 -29
- package/package.json +5 -5
- package/src/components/SolanaTxSendModal.tsx +1 -5
package/dist/index.js
CHANGED
|
@@ -178129,16 +178129,16 @@ function SolanaTxSendModal({
|
|
|
178129
178129
|
};
|
|
178130
178130
|
useEffect(() => {
|
|
178131
178131
|
async function Qr() {
|
|
178132
|
-
var qr, Hr
|
|
178132
|
+
var qr, Hr;
|
|
178133
178133
|
if (!(!hr || !or || !lr || !dr))
|
|
178134
178134
|
try {
|
|
178135
|
-
const
|
|
178136
|
-
|
|
178137
|
-
const
|
|
178138
|
-
|
|
178139
|
-
const
|
|
178140
|
-
|
|
178141
|
-
|
|
178135
|
+
const Jr = new Transaction$3();
|
|
178136
|
+
Jr.instructions = [...or.instructions];
|
|
178137
|
+
const zr = await hr.getLatestBlockhash("confirmed");
|
|
178138
|
+
Jr.recentBlockhash = zr.blockhash, Jr.lastValidBlockHeight = zr.lastValidBlockHeight, Jr.feePayer = lr;
|
|
178139
|
+
const Vr = extractWritableAccounts(Jr), Yr = await buildOptimalTransactionFromConnection(
|
|
178140
|
+
Jr,
|
|
178141
|
+
Vr,
|
|
178142
178142
|
hr,
|
|
178143
178143
|
ar,
|
|
178144
178144
|
lr,
|
|
@@ -178146,29 +178146,29 @@ function SolanaTxSendModal({
|
|
|
178146
178146
|
process$1.env.REACT_APP_HELIUS_API_KEY
|
|
178147
178147
|
);
|
|
178148
178148
|
Cr.logAction("SigningTransaction", {
|
|
178149
|
-
priceData:
|
|
178150
|
-
unitsData:
|
|
178151
|
-
recentBlockhash:
|
|
178152
|
-
lastValidBlockHeight:
|
|
178149
|
+
priceData: Yr.instructions[0].data,
|
|
178150
|
+
unitsData: Yr.instructions[1].data,
|
|
178151
|
+
recentBlockhash: Yr.recentBlockhash,
|
|
178152
|
+
lastValidBlockHeight: Yr.lastValidBlockHeight
|
|
178153
178153
|
});
|
|
178154
|
-
const
|
|
178154
|
+
const Dr = await dr(Yr);
|
|
178155
178155
|
Cr.logAction("SendingTransaction", {});
|
|
178156
|
-
const
|
|
178157
|
-
|
|
178156
|
+
const br = await hr.sendRawTransaction(
|
|
178157
|
+
Dr.serialize(),
|
|
178158
178158
|
{
|
|
178159
178159
|
preflightCommitment: "confirmed",
|
|
178160
178160
|
skipPreflight: !0,
|
|
178161
178161
|
maxRetries: 0
|
|
178162
178162
|
}
|
|
178163
178163
|
);
|
|
178164
|
-
for (gr(
|
|
178165
|
-
const
|
|
178164
|
+
for (gr(br), fr(setSolanaSignature(br)); ; ) {
|
|
178165
|
+
const wr = await hr.getSignatureStatus(br, {
|
|
178166
178166
|
searchTransactionHistory: !0
|
|
178167
178167
|
});
|
|
178168
|
-
if (((qr =
|
|
178169
|
-
if ((
|
|
178168
|
+
if (((qr = wr == null ? void 0 : wr.value) == null ? void 0 : qr.confirmationStatus) === "finalized") {
|
|
178169
|
+
if ((Hr = wr == null ? void 0 : wr.value) != null && Hr.err) {
|
|
178170
178170
|
Cr.logAction("TransactionError", {
|
|
178171
|
-
signature:
|
|
178171
|
+
signature: br
|
|
178172
178172
|
}), fr(
|
|
178173
178173
|
setError({
|
|
178174
178174
|
errorMessage: "Your transaction was confirmed but had errors. Please check the transaction details on the explorer for more information."
|
|
@@ -178177,24 +178177,24 @@ function SolanaTxSendModal({
|
|
|
178177
178177
|
return;
|
|
178178
178178
|
}
|
|
178179
178179
|
Cr.logAction("TransactionSuccess", {
|
|
178180
|
-
signature:
|
|
178181
|
-
}), ur({ signature:
|
|
178180
|
+
signature: br
|
|
178181
|
+
}), ur({ signature: br });
|
|
178182
178182
|
return;
|
|
178183
178183
|
}
|
|
178184
178184
|
if ((await hr.getLatestBlockhash(
|
|
178185
178185
|
"confirmed"
|
|
178186
|
-
)).lastValidBlockHeight -
|
|
178186
|
+
)).lastValidBlockHeight - Yr.lastValidBlockHeight > 100) {
|
|
178187
178187
|
Cr.logAction("ShowRetryScreenDueToExpiration", {
|
|
178188
|
-
signature:
|
|
178188
|
+
signature: br
|
|
178189
178189
|
}), Sr(!0);
|
|
178190
178190
|
return;
|
|
178191
178191
|
}
|
|
178192
178192
|
await sleep$4(1e3);
|
|
178193
178193
|
}
|
|
178194
|
-
} catch (
|
|
178195
|
-
console.log(
|
|
178196
|
-
const
|
|
178197
|
-
Cr.logAction("UnknownError", { error:
|
|
178194
|
+
} catch (Jr) {
|
|
178195
|
+
console.log(Jr);
|
|
178196
|
+
const zr = Jr;
|
|
178197
|
+
Cr.logAction("UnknownError", { error: zr == null ? void 0 : zr.message }), Cr.logError(zr), fr(setError({ errorMessage: (zr == null ? void 0 : zr.message) || "" }));
|
|
178198
178198
|
}
|
|
178199
178199
|
}
|
|
178200
178200
|
Qr();
|
|
@@ -178213,7 +178213,7 @@ function SolanaTxSendModal({
|
|
|
178213
178213
|
]);
|
|
178214
178214
|
const Ur = useCallback(
|
|
178215
178215
|
(Qr) => {
|
|
178216
|
-
|
|
178216
|
+
xr(Qr), Sr(!1), Pr();
|
|
178217
178217
|
},
|
|
178218
178218
|
[Pr]
|
|
178219
178219
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@huma-finance/widgets",
|
|
3
|
-
"version": "0.0.75-beta.
|
|
3
|
+
"version": "0.0.75-beta.975+e06a575",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"@ethersproject/contracts": "^5.7.0",
|
|
23
23
|
"@ethersproject/experimental": "^5.7.0",
|
|
24
24
|
"@ethersproject/units": "^5.6.0",
|
|
25
|
-
"@huma-finance/sdk": "^0.0.75-beta.
|
|
26
|
-
"@huma-finance/shared": "^0.0.75-beta.
|
|
27
|
-
"@huma-finance/web-shared": "^0.0.75-beta.
|
|
25
|
+
"@huma-finance/sdk": "^0.0.75-beta.975+e06a575",
|
|
26
|
+
"@huma-finance/shared": "^0.0.75-beta.975+e06a575",
|
|
27
|
+
"@huma-finance/web-shared": "^0.0.75-beta.975+e06a575",
|
|
28
28
|
"@mui/x-date-pickers": "^5.0.7",
|
|
29
29
|
"@notifi-network/notifi-frontend-client": "^1.1.2",
|
|
30
30
|
"@notifi-network/notifi-react": "^1.1.2",
|
|
@@ -190,5 +190,5 @@
|
|
|
190
190
|
"optionalDependencies": {
|
|
191
191
|
"encoding": "^0.1.13"
|
|
192
192
|
},
|
|
193
|
-
"gitHead": "
|
|
193
|
+
"gitHead": "e06a57522f4497bc24cf70c9aafe0b3f88ac6b7b"
|
|
194
194
|
}
|
|
@@ -127,10 +127,7 @@ export function SolanaTxSendModal({
|
|
|
127
127
|
const result = await connection.getSignatureStatus(signatureResult, {
|
|
128
128
|
searchTransactionHistory: true,
|
|
129
129
|
})
|
|
130
|
-
if (
|
|
131
|
-
result?.value?.confirmationStatus === 'finalized' ||
|
|
132
|
-
result?.value?.confirmationStatus === 'confirmed'
|
|
133
|
-
) {
|
|
130
|
+
if (result?.value?.confirmationStatus === 'finalized') {
|
|
134
131
|
if (result?.value?.err) {
|
|
135
132
|
loggingHelper.logAction('TransactionError', {
|
|
136
133
|
signature: signatureResult,
|
|
@@ -196,7 +193,6 @@ export function SolanaTxSendModal({
|
|
|
196
193
|
|
|
197
194
|
const handleRetry = useCallback(
|
|
198
195
|
(highPriority: boolean) => {
|
|
199
|
-
console.log('handleRetry')
|
|
200
196
|
setUseHighPriority(highPriority)
|
|
201
197
|
setShowRetryScreen(false)
|
|
202
198
|
refresh()
|