@pooflabs/web 0.0.80 → 0.0.81-rc2
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/auth/providers/phantom-wallet-provider.d.ts +20 -0
- package/dist/index-Bdcc5821.js +2375 -0
- package/dist/index-Bdcc5821.js.map +1 -0
- package/dist/{index-BhfNMrC0.js → index-BjlCinic.js} +25 -883
- package/dist/index-BjlCinic.js.map +1 -0
- package/dist/{index-Db0NqU8R.esm.js → index-Bx_lLXRT.esm.js} +342 -277
- package/dist/index-Bx_lLXRT.esm.js.map +1 -0
- package/dist/{index-COIUWugk.esm.js → index-CHqM9n4K.esm.js} +24 -881
- package/dist/index-CHqM9n4K.esm.js.map +1 -0
- package/dist/{index-BVi7fTm2.js → index-CL4JIAAR.js} +24 -882
- package/dist/index-CL4JIAAR.js.map +1 -0
- package/dist/index-CrOVJFX9.esm.js +2373 -0
- package/dist/index-CrOVJFX9.esm.js.map +1 -0
- package/dist/{index-BbtYb8sE.esm.js → index-DCo85UGg.esm.js} +23 -882
- package/dist/index-DCo85UGg.esm.js.map +1 -0
- package/dist/{index-BNyxZ82q.js → index-DHm4usay.js} +342 -276
- package/dist/index-DHm4usay.js.map +1 -0
- package/dist/{index.browser-BuHl80dp.esm.js → index.browser-7dDfRU5G.esm.js} +1367 -1697
- package/dist/index.browser-7dDfRU5G.esm.js.map +1 -0
- package/dist/index.browser-Bg_-PAgT.esm.js +1250 -0
- package/dist/index.browser-Bg_-PAgT.esm.js.map +1 -0
- package/dist/index.browser-C-_FEr5M.esm.js +1134 -0
- package/dist/index.browser-C-_FEr5M.esm.js.map +1 -0
- package/dist/{index.browser-8hyi2LOX.js → index.browser-CmlqbyPr.js} +1367 -1697
- package/dist/index.browser-CmlqbyPr.js.map +1 -0
- package/dist/index.browser-CxXQ2RhF.js +122 -0
- package/dist/index.browser-CxXQ2RhF.js.map +1 -0
- package/dist/index.browser-DjEZSiqI.js +1137 -0
- package/dist/index.browser-DjEZSiqI.js.map +1 -0
- package/dist/index.browser-DuVkpEzB.js +1253 -0
- package/dist/index.browser-DuVkpEzB.js.map +1 -0
- package/dist/index.browser-xJkO73vw.esm.js +119 -0
- package/dist/index.browser-xJkO73vw.esm.js.map +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{index.native-DUnE51Mx.js → index.native-DJA9_K3i.js} +186 -2669
- package/dist/index.native-DJA9_K3i.js.map +1 -0
- package/dist/{index.native-DuKhZcus.esm.js → index.native-TLhfXfe6.esm.js} +187 -2669
- package/dist/index.native-TLhfXfe6.esm.js.map +1 -0
- package/dist/index.native.esm.js +1 -1
- package/dist/index.native.js +1 -1
- package/dist/{phantom-wallet-provider-Cg-srwP4.js → phantom-wallet-provider-BegJFoWW.js} +141 -12
- package/dist/{phantom-wallet-provider-Cg-srwP4.js.map → phantom-wallet-provider-BegJFoWW.js.map} +1 -1
- package/dist/{phantom-wallet-provider--BJjVUA1.esm.js → phantom-wallet-provider-DzUAMhbm.esm.js} +141 -12
- package/dist/{phantom-wallet-provider--BJjVUA1.esm.js.map → phantom-wallet-provider-DzUAMhbm.esm.js.map} +1 -1
- package/dist/{privy-wallet-provider-BLcur3Ue.esm.js → privy-wallet-provider-BspbiyOr.esm.js} +3 -3
- package/dist/privy-wallet-provider-BspbiyOr.esm.js.map +1 -0
- package/dist/{privy-wallet-provider-DpNVyaXa.js → privy-wallet-provider-Du-QHaaG.js} +3 -3
- package/dist/privy-wallet-provider-Du-QHaaG.js.map +1 -0
- package/dist/{solana-mobile-wallet-provider-CFaubssb.esm.js → solana-mobile-wallet-provider-Bh7SBFpQ.esm.js} +53 -4
- package/dist/{solana-mobile-wallet-provider-CFaubssb.esm.js.map → solana-mobile-wallet-provider-Bh7SBFpQ.esm.js.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-zXAk2tfS.js → solana-mobile-wallet-provider-DPp4SYem.js} +53 -4
- package/dist/{solana-mobile-wallet-provider-zXAk2tfS.js.map → solana-mobile-wallet-provider-DPp4SYem.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-BNyxZ82q.js.map +0 -1
- package/dist/index-BVi7fTm2.js.map +0 -1
- package/dist/index-BbtYb8sE.esm.js.map +0 -1
- package/dist/index-BhfNMrC0.js.map +0 -1
- package/dist/index-CKIoDkjJ.esm.js +0 -6
- package/dist/index-CKIoDkjJ.esm.js.map +0 -1
- package/dist/index-COIUWugk.esm.js.map +0 -1
- package/dist/index-CSraUgD6.js +0 -8
- package/dist/index-CSraUgD6.js.map +0 -1
- package/dist/index-Db0NqU8R.esm.js.map +0 -1
- package/dist/index.browser-8hyi2LOX.js.map +0 -1
- package/dist/index.browser-B4zXnffD.esm.js +0 -225
- package/dist/index.browser-B4zXnffD.esm.js.map +0 -1
- package/dist/index.browser-BJ_TdUVA.js +0 -228
- package/dist/index.browser-BJ_TdUVA.js.map +0 -1
- package/dist/index.browser-BkNaRRVe.js +0 -1222
- package/dist/index.browser-BkNaRRVe.js.map +0 -1
- package/dist/index.browser-BuHl80dp.esm.js.map +0 -1
- package/dist/index.browser-CnbxBj3-.esm.js +0 -1219
- package/dist/index.browser-CnbxBj3-.esm.js.map +0 -1
- package/dist/index.browser-OvGNsMPu.esm.js +0 -1002
- package/dist/index.browser-OvGNsMPu.esm.js.map +0 -1
- package/dist/index.browser-vuTr40so.js +0 -1008
- package/dist/index.browser-vuTr40so.js.map +0 -1
- package/dist/index.native-DUnE51Mx.js.map +0 -1
- package/dist/index.native-DuKhZcus.esm.js.map +0 -1
- package/dist/privy-wallet-provider-BLcur3Ue.esm.js.map +0 -1
- package/dist/privy-wallet-provider-DpNVyaXa.js.map +0 -1
|
@@ -1,11 +1,51 @@
|
|
|
1
|
-
import { b as bufferExports } from './index-
|
|
2
|
-
import { g as getPlatform,
|
|
1
|
+
import { b as bufferExports } from './index-CrOVJFX9.esm.js';
|
|
2
|
+
import { g as getPlatform, k as setAuthLoading, W as WebSessionManager, s as setCurrentUser, l as genAuthNonce, m as genSolanaMessage, n as createSessionWithSignature, e as confirmAndCheckTransaction, c as convertRemainingAccounts, b as buildSetDocumentsTransaction, a as SOLANA_DEVNET_RPC_URL, S as SOLANA_MAINNET_RPC_URL, i as SURFNET_RPC_URL } from './index.native-TLhfXfe6.esm.js';
|
|
3
3
|
import { PublicKey, Connection, VersionedTransaction } from '@solana/web3.js';
|
|
4
4
|
import * as anchor from '@coral-xyz/anchor';
|
|
5
5
|
import 'axios';
|
|
6
6
|
import 'react';
|
|
7
7
|
|
|
8
8
|
const ED25519_SIGNATURE_LENGTH = 64;
|
|
9
|
+
/**
|
|
10
|
+
* On Android Chrome PWA (e.g. Solana Seeker in standalone mode), MWA's
|
|
11
|
+
* transact() opens a WebSocket to ws://localhost:<port>/solana-wallet to
|
|
12
|
+
* handshake with the wallet app on the device. Chrome guards localhost
|
|
13
|
+
* connections behind the Local Network Access ("Apps on Device") permission
|
|
14
|
+
* dialog. The dialog inherits the activity's window-focus state at spawn
|
|
15
|
+
* time — so if focus is in transit (e.g. just after a Phantom-modal close
|
|
16
|
+
* triggers a React commit), the dialog renders with grayed-out Allow/Block
|
|
17
|
+
* buttons and only becomes interactive after a manual background→resume
|
|
18
|
+
* (which forces an onPause→onResume cycle on the activity).
|
|
19
|
+
*
|
|
20
|
+
* Wait for window focus to settle, then yield one frame, before opening
|
|
21
|
+
* the WebSocket. This makes the system dialog spawn into a focused activity
|
|
22
|
+
* so its buttons are immediately tappable.
|
|
23
|
+
*/
|
|
24
|
+
async function awaitActivityFocus() {
|
|
25
|
+
if (typeof document === 'undefined' || typeof window === 'undefined')
|
|
26
|
+
return;
|
|
27
|
+
if (!document.hasFocus()) {
|
|
28
|
+
await new Promise((resolve) => {
|
|
29
|
+
const onFocus = () => {
|
|
30
|
+
window.removeEventListener('focus', onFocus);
|
|
31
|
+
resolve();
|
|
32
|
+
};
|
|
33
|
+
window.addEventListener('focus', onFocus);
|
|
34
|
+
// Fallback in case the focus event never fires (e.g. activity
|
|
35
|
+
// already focused but document.hasFocus() momentarily lies during
|
|
36
|
+
// a React commit). 600ms is a perceptual ceiling — beyond this
|
|
37
|
+
// the user notices a stall, so we'd rather take the focus race
|
|
38
|
+
// than block forever.
|
|
39
|
+
setTimeout(() => {
|
|
40
|
+
window.removeEventListener('focus', onFocus);
|
|
41
|
+
resolve();
|
|
42
|
+
}, 600);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
// Yield to next paint so any pending React commits / focus changes have
|
|
46
|
+
// flushed before the WebSocket open spawns the system dialog.
|
|
47
|
+
await new Promise((r) => requestAnimationFrame(() => r()));
|
|
48
|
+
}
|
|
9
49
|
// Dynamically imported MWA protocol module
|
|
10
50
|
let mwaProtocolModule = null;
|
|
11
51
|
let mwaProtocolLoadPromise = null;
|
|
@@ -18,7 +58,7 @@ async function loadMwaProtocol() {
|
|
|
18
58
|
return mwaProtocolLoadPromise;
|
|
19
59
|
mwaProtocolLoadPromise = (async () => {
|
|
20
60
|
try {
|
|
21
|
-
mwaProtocolModule = await import('./index.browser-
|
|
61
|
+
mwaProtocolModule = await import('./index.browser-Bg_-PAgT.esm.js');
|
|
22
62
|
}
|
|
23
63
|
catch (e) {
|
|
24
64
|
console.warn('[SolanaMobileWallet] @solana-mobile/mobile-wallet-adapter-protocol-web3js not installed. Install it to enable Seeker wallet support.');
|
|
@@ -136,6 +176,7 @@ class SolanaMobileWalletProvider {
|
|
|
136
176
|
}
|
|
137
177
|
// Pre-fetch nonce from server while wallet is not yet connected
|
|
138
178
|
const nonce = await genAuthNonce();
|
|
179
|
+
await awaitActivityFocus();
|
|
139
180
|
// Single transact() call: authorize + signMessages — one wallet popup
|
|
140
181
|
const result = await transact(async (wallet) => {
|
|
141
182
|
// Step 1: Authorize — user approves the dApp
|
|
@@ -224,6 +265,7 @@ class SolanaMobileWalletProvider {
|
|
|
224
265
|
await loadMwaProtocol();
|
|
225
266
|
const { transact } = mwaProtocolModule;
|
|
226
267
|
const authToken = this.authToken;
|
|
268
|
+
await awaitActivityFocus();
|
|
227
269
|
await transact(async (wallet) => {
|
|
228
270
|
await wallet.deauthorize({ auth_token: authToken });
|
|
229
271
|
}, this.getAssociationConfig());
|
|
@@ -249,6 +291,7 @@ class SolanaMobileWalletProvider {
|
|
|
249
291
|
const { transact } = mwaProtocolModule;
|
|
250
292
|
const base64Addr = this.base64Address;
|
|
251
293
|
try {
|
|
294
|
+
await awaitActivityFocus();
|
|
252
295
|
const signedMessages = await transact(async (wallet) => {
|
|
253
296
|
await this.reauthorizeWallet(wallet);
|
|
254
297
|
const messageBytes = getPlatform().textEncode(message);
|
|
@@ -302,6 +345,7 @@ class SolanaMobileWalletProvider {
|
|
|
302
345
|
}
|
|
303
346
|
}
|
|
304
347
|
try {
|
|
348
|
+
await awaitActivityFocus();
|
|
305
349
|
const signedTransactions = await transact(async (wallet) => {
|
|
306
350
|
await this.reauthorizeWallet(wallet);
|
|
307
351
|
return wallet.signTransactions({ transactions: [transaction] });
|
|
@@ -349,6 +393,7 @@ class SolanaMobileWalletProvider {
|
|
|
349
393
|
}
|
|
350
394
|
if (isSurfnet) {
|
|
351
395
|
// Surfnet: sign-only, then submit to our specific RPC
|
|
396
|
+
await awaitActivityFocus();
|
|
352
397
|
const signedTransactions = await transact(async (wallet) => {
|
|
353
398
|
await this.reauthorizeWallet(wallet);
|
|
354
399
|
return wallet.signTransactions({ transactions: [transaction] });
|
|
@@ -368,6 +413,7 @@ class SolanaMobileWalletProvider {
|
|
|
368
413
|
return signature;
|
|
369
414
|
}
|
|
370
415
|
// Non-surfnet: use signAndSendTransactions for wallet-optimized submission
|
|
416
|
+
await awaitActivityFocus();
|
|
371
417
|
const signatures = await transact(async (wallet) => {
|
|
372
418
|
await this.reauthorizeWallet(wallet);
|
|
373
419
|
return wallet.signAndSendTransactions({
|
|
@@ -451,6 +497,7 @@ class SolanaMobileWalletProvider {
|
|
|
451
497
|
tx = result.tx;
|
|
452
498
|
}
|
|
453
499
|
if ((options === null || options === void 0 ? void 0 : options.shouldSubmitTx) === false) {
|
|
500
|
+
await awaitActivityFocus();
|
|
454
501
|
const [signedTx] = await transact(async (wallet) => {
|
|
455
502
|
await this.reauthorizeWallet(wallet);
|
|
456
503
|
return wallet.signTransactions({ transactions: [tx] });
|
|
@@ -464,6 +511,7 @@ class SolanaMobileWalletProvider {
|
|
|
464
511
|
}
|
|
465
512
|
if (isSurfnet) {
|
|
466
513
|
// Surfnet: sign then submit manually to our RPC
|
|
514
|
+
await awaitActivityFocus();
|
|
467
515
|
const [signedTx] = await transact(async (wallet) => {
|
|
468
516
|
await this.reauthorizeWallet(wallet);
|
|
469
517
|
return wallet.signTransactions({ transactions: [tx] });
|
|
@@ -492,6 +540,7 @@ class SolanaMobileWalletProvider {
|
|
|
492
540
|
};
|
|
493
541
|
}
|
|
494
542
|
// Non-surfnet: use signAndSendTransactions
|
|
543
|
+
await awaitActivityFocus();
|
|
495
544
|
const signatures = await transact(async (wallet) => {
|
|
496
545
|
await this.reauthorizeWallet(wallet);
|
|
497
546
|
return wallet.signAndSendTransactions({
|
|
@@ -555,4 +604,4 @@ class SolanaMobileWalletProvider {
|
|
|
555
604
|
SolanaMobileWalletProvider.instance = null;
|
|
556
605
|
|
|
557
606
|
export { SolanaMobileWalletProvider };
|
|
558
|
-
//# sourceMappingURL=solana-mobile-wallet-provider-
|
|
607
|
+
//# sourceMappingURL=solana-mobile-wallet-provider-Bh7SBFpQ.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solana-mobile-wallet-provider-
|
|
1
|
+
{"version":3,"file":"solana-mobile-wallet-provider-Bh7SBFpQ.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/{solana-mobile-wallet-provider-zXAk2tfS.js → solana-mobile-wallet-provider-DPp4SYem.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var index_native = require('./index.native-
|
|
3
|
+
var index = require('./index-Bdcc5821.js');
|
|
4
|
+
var index_native = require('./index.native-DJA9_K3i.js');
|
|
5
5
|
var web3_js = require('@solana/web3.js');
|
|
6
6
|
var anchor = require('@coral-xyz/anchor');
|
|
7
7
|
require('axios');
|
|
@@ -27,6 +27,46 @@ function _interopNamespaceDefault(e) {
|
|
|
27
27
|
var anchor__namespace = /*#__PURE__*/_interopNamespaceDefault(anchor);
|
|
28
28
|
|
|
29
29
|
const ED25519_SIGNATURE_LENGTH = 64;
|
|
30
|
+
/**
|
|
31
|
+
* On Android Chrome PWA (e.g. Solana Seeker in standalone mode), MWA's
|
|
32
|
+
* transact() opens a WebSocket to ws://localhost:<port>/solana-wallet to
|
|
33
|
+
* handshake with the wallet app on the device. Chrome guards localhost
|
|
34
|
+
* connections behind the Local Network Access ("Apps on Device") permission
|
|
35
|
+
* dialog. The dialog inherits the activity's window-focus state at spawn
|
|
36
|
+
* time — so if focus is in transit (e.g. just after a Phantom-modal close
|
|
37
|
+
* triggers a React commit), the dialog renders with grayed-out Allow/Block
|
|
38
|
+
* buttons and only becomes interactive after a manual background→resume
|
|
39
|
+
* (which forces an onPause→onResume cycle on the activity).
|
|
40
|
+
*
|
|
41
|
+
* Wait for window focus to settle, then yield one frame, before opening
|
|
42
|
+
* the WebSocket. This makes the system dialog spawn into a focused activity
|
|
43
|
+
* so its buttons are immediately tappable.
|
|
44
|
+
*/
|
|
45
|
+
async function awaitActivityFocus() {
|
|
46
|
+
if (typeof document === 'undefined' || typeof window === 'undefined')
|
|
47
|
+
return;
|
|
48
|
+
if (!document.hasFocus()) {
|
|
49
|
+
await new Promise((resolve) => {
|
|
50
|
+
const onFocus = () => {
|
|
51
|
+
window.removeEventListener('focus', onFocus);
|
|
52
|
+
resolve();
|
|
53
|
+
};
|
|
54
|
+
window.addEventListener('focus', onFocus);
|
|
55
|
+
// Fallback in case the focus event never fires (e.g. activity
|
|
56
|
+
// already focused but document.hasFocus() momentarily lies during
|
|
57
|
+
// a React commit). 600ms is a perceptual ceiling — beyond this
|
|
58
|
+
// the user notices a stall, so we'd rather take the focus race
|
|
59
|
+
// than block forever.
|
|
60
|
+
setTimeout(() => {
|
|
61
|
+
window.removeEventListener('focus', onFocus);
|
|
62
|
+
resolve();
|
|
63
|
+
}, 600);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
// Yield to next paint so any pending React commits / focus changes have
|
|
67
|
+
// flushed before the WebSocket open spawns the system dialog.
|
|
68
|
+
await new Promise((r) => requestAnimationFrame(() => r()));
|
|
69
|
+
}
|
|
30
70
|
// Dynamically imported MWA protocol module
|
|
31
71
|
let mwaProtocolModule = null;
|
|
32
72
|
let mwaProtocolLoadPromise = null;
|
|
@@ -39,7 +79,7 @@ async function loadMwaProtocol() {
|
|
|
39
79
|
return mwaProtocolLoadPromise;
|
|
40
80
|
mwaProtocolLoadPromise = (async () => {
|
|
41
81
|
try {
|
|
42
|
-
mwaProtocolModule = await Promise.resolve().then(function () { return require('./index.browser-
|
|
82
|
+
mwaProtocolModule = await Promise.resolve().then(function () { return require('./index.browser-DuVkpEzB.js'); });
|
|
43
83
|
}
|
|
44
84
|
catch (e) {
|
|
45
85
|
console.warn('[SolanaMobileWallet] @solana-mobile/mobile-wallet-adapter-protocol-web3js not installed. Install it to enable Seeker wallet support.');
|
|
@@ -157,6 +197,7 @@ class SolanaMobileWalletProvider {
|
|
|
157
197
|
}
|
|
158
198
|
// Pre-fetch nonce from server while wallet is not yet connected
|
|
159
199
|
const nonce = await index_native.genAuthNonce();
|
|
200
|
+
await awaitActivityFocus();
|
|
160
201
|
// Single transact() call: authorize + signMessages — one wallet popup
|
|
161
202
|
const result = await transact(async (wallet) => {
|
|
162
203
|
// Step 1: Authorize — user approves the dApp
|
|
@@ -245,6 +286,7 @@ class SolanaMobileWalletProvider {
|
|
|
245
286
|
await loadMwaProtocol();
|
|
246
287
|
const { transact } = mwaProtocolModule;
|
|
247
288
|
const authToken = this.authToken;
|
|
289
|
+
await awaitActivityFocus();
|
|
248
290
|
await transact(async (wallet) => {
|
|
249
291
|
await wallet.deauthorize({ auth_token: authToken });
|
|
250
292
|
}, this.getAssociationConfig());
|
|
@@ -270,6 +312,7 @@ class SolanaMobileWalletProvider {
|
|
|
270
312
|
const { transact } = mwaProtocolModule;
|
|
271
313
|
const base64Addr = this.base64Address;
|
|
272
314
|
try {
|
|
315
|
+
await awaitActivityFocus();
|
|
273
316
|
const signedMessages = await transact(async (wallet) => {
|
|
274
317
|
await this.reauthorizeWallet(wallet);
|
|
275
318
|
const messageBytes = index_native.getPlatform().textEncode(message);
|
|
@@ -323,6 +366,7 @@ class SolanaMobileWalletProvider {
|
|
|
323
366
|
}
|
|
324
367
|
}
|
|
325
368
|
try {
|
|
369
|
+
await awaitActivityFocus();
|
|
326
370
|
const signedTransactions = await transact(async (wallet) => {
|
|
327
371
|
await this.reauthorizeWallet(wallet);
|
|
328
372
|
return wallet.signTransactions({ transactions: [transaction] });
|
|
@@ -370,6 +414,7 @@ class SolanaMobileWalletProvider {
|
|
|
370
414
|
}
|
|
371
415
|
if (isSurfnet) {
|
|
372
416
|
// Surfnet: sign-only, then submit to our specific RPC
|
|
417
|
+
await awaitActivityFocus();
|
|
373
418
|
const signedTransactions = await transact(async (wallet) => {
|
|
374
419
|
await this.reauthorizeWallet(wallet);
|
|
375
420
|
return wallet.signTransactions({ transactions: [transaction] });
|
|
@@ -389,6 +434,7 @@ class SolanaMobileWalletProvider {
|
|
|
389
434
|
return signature;
|
|
390
435
|
}
|
|
391
436
|
// Non-surfnet: use signAndSendTransactions for wallet-optimized submission
|
|
437
|
+
await awaitActivityFocus();
|
|
392
438
|
const signatures = await transact(async (wallet) => {
|
|
393
439
|
await this.reauthorizeWallet(wallet);
|
|
394
440
|
return wallet.signAndSendTransactions({
|
|
@@ -472,6 +518,7 @@ class SolanaMobileWalletProvider {
|
|
|
472
518
|
tx = result.tx;
|
|
473
519
|
}
|
|
474
520
|
if ((options === null || options === void 0 ? void 0 : options.shouldSubmitTx) === false) {
|
|
521
|
+
await awaitActivityFocus();
|
|
475
522
|
const [signedTx] = await transact(async (wallet) => {
|
|
476
523
|
await this.reauthorizeWallet(wallet);
|
|
477
524
|
return wallet.signTransactions({ transactions: [tx] });
|
|
@@ -485,6 +532,7 @@ class SolanaMobileWalletProvider {
|
|
|
485
532
|
}
|
|
486
533
|
if (isSurfnet) {
|
|
487
534
|
// Surfnet: sign then submit manually to our RPC
|
|
535
|
+
await awaitActivityFocus();
|
|
488
536
|
const [signedTx] = await transact(async (wallet) => {
|
|
489
537
|
await this.reauthorizeWallet(wallet);
|
|
490
538
|
return wallet.signTransactions({ transactions: [tx] });
|
|
@@ -513,6 +561,7 @@ class SolanaMobileWalletProvider {
|
|
|
513
561
|
};
|
|
514
562
|
}
|
|
515
563
|
// Non-surfnet: use signAndSendTransactions
|
|
564
|
+
await awaitActivityFocus();
|
|
516
565
|
const signatures = await transact(async (wallet) => {
|
|
517
566
|
await this.reauthorizeWallet(wallet);
|
|
518
567
|
return wallet.signAndSendTransactions({
|
|
@@ -576,4 +625,4 @@ class SolanaMobileWalletProvider {
|
|
|
576
625
|
SolanaMobileWalletProvider.instance = null;
|
|
577
626
|
|
|
578
627
|
exports.SolanaMobileWalletProvider = SolanaMobileWalletProvider;
|
|
579
|
-
//# sourceMappingURL=solana-mobile-wallet-provider-
|
|
628
|
+
//# sourceMappingURL=solana-mobile-wallet-provider-DPp4SYem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solana-mobile-wallet-provider-
|
|
1
|
+
{"version":3,"file":"solana-mobile-wallet-provider-DPp4SYem.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|