@meshconnect/uwc-injected-connector 0.20.0-snapshot.e930396 → 0.20.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.
@@ -69,31 +69,6 @@ export declare class LegacyInjectedSolanaWalletAdapter extends BaseMessageSigner
69
69
  get readyState(): WalletReadyState;
70
70
  connect(): Promise<void>;
71
71
  disconnect(): Promise<void>;
72
- /**
73
- * Send a transaction via sign-only + self-broadcast, NOT the provider's
74
- * `signAndSendTransaction`.
75
- *
76
- * WHY (ONC-249): in Coinbase/Base Wallet Legacy mode's in-app browser,
77
- * approving a `signAndSendTransaction` **reloads the page** at approval time
78
- * (`blur → pagehide(persisted=false) → fresh boot`). The pending promise dies
79
- * with the page, so the signature is never delivered — the flow hangs on
80
- * "Completing transfer…" even though the tx broadcasts and confirms on-chain
81
- * (silent success shown as failure). Probe-verified on device (iOS,
82
- * CoinbaseWalletRN/30.4.109): `signTransaction` (sign-only) does NOT reload;
83
- * `signAndSendTransaction` does. So we sign in the wallet, then broadcast
84
- * ourselves through the RPC `connection` (already a hard dep of every send).
85
- *
86
- * Scope: this applies only to wallets discovered via the `solana.injectedId`
87
- * metadata fallback (today: Coinbase/Base Wallet Legacy mode). Wallet-Standard,
88
- * WalletConnect, EVM, TRON and TON paths are untouched. Trade-off: we own the
89
- * broadcast; the wallet no longer rebroadcasts.
90
- *
91
- * Shape mirrors `@solana/wallet-adapter-base` `BaseSignerWalletAdapter`
92
- * (sign → serialize → `sendRawTransaction`), including its `emit` flag so a
93
- * signing failure (incl. user rejection) surfaces as the original
94
- * `WalletSignTransactionError` — a rejection, not a generic send error — and
95
- * is not double-emitted (`signTransaction` already emitted it).
96
- */
97
72
  sendTransaction<T extends Transaction | VersionedTransaction>(transaction: T, connection: Connection, options?: SendTransactionOptions): Promise<TransactionSignature>;
98
73
  signTransaction<T extends Transaction | VersionedTransaction>(transaction: T): Promise<T>;
99
74
  signAllTransactions<T extends Transaction | VersionedTransaction>(transactions: T[]): Promise<T[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"legacy-injected-solana-adapter.d.ts","sourceRoot":"","sources":["../src/legacy-injected-solana-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EACV,YAAY,EACZ,sBAAsB,EACtB,UAAU,EACX,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,8BAA8B,EAW9B,gBAAgB,EAIjB,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,UAAU,0BAA0B;IAClC,OAAO,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAA;IACpC,UAAU,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAA;CACxC;AAED;;;GAGG;AACH,MAAM,WAAW,4BAA6B,SAAQ,YAAY,CAAC,0BAA0B,CAAC;IAC5F,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,eAAe,CAAC,CAAC,SAAS,WAAW,GAAG,oBAAoB,EAC1D,WAAW,EAAE,CAAC,GACb,OAAO,CAAC,CAAC,CAAC,CAAA;IACb,mBAAmB,CAAC,CAAC,SAAS,WAAW,GAAG,oBAAoB,EAC9D,YAAY,EAAE,CAAC,EAAE,GAChB,OAAO,CAAC,CAAC,EAAE,CAAC,CAAA;IACf,sBAAsB,CAAC,CAAC,SAAS,WAAW,GAAG,oBAAoB,EACjE,WAAW,EAAE,CAAC,EACd,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC;QAAE,SAAS,EAAE,oBAAoB,CAAA;KAAE,CAAC,CAAA;IAC/C,WAAW,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC;QAAE,SAAS,EAAE,UAAU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CAAC,CAAC,CAAC;IAkBE,mBAAmB,CAChC,CAAC,SAAS,WAAW,GAAG,oBAAoB,EAC5C,YAAY,EAAE,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IAqB5B,WAAW,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAmB3D,OAAO,CAAC,aAAa,CAWpB;CACF"}
1
+ {"version":3,"file":"legacy-injected-solana-adapter.d.ts","sourceRoot":"","sources":["../src/legacy-injected-solana-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EACV,YAAY,EACZ,sBAAsB,EACtB,UAAU,EACX,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,8BAA8B,EAW9B,gBAAgB,EAIjB,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,UAAU,0BAA0B;IAClC,OAAO,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAA;IACpC,UAAU,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAA;CACxC;AAED;;;GAGG;AACH,MAAM,WAAW,4BAA6B,SAAQ,YAAY,CAAC,0BAA0B,CAAC;IAC5F,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,eAAe,CAAC,CAAC,SAAS,WAAW,GAAG,oBAAoB,EAC1D,WAAW,EAAE,CAAC,GACb,OAAO,CAAC,CAAC,CAAC,CAAA;IACb,mBAAmB,CAAC,CAAC,SAAS,WAAW,GAAG,oBAAoB,EAC9D,YAAY,EAAE,CAAC,EAAE,GAChB,OAAO,CAAC,CAAC,EAAE,CAAC,CAAA;IACf,sBAAsB,CAAC,CAAC,SAAS,WAAW,GA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C,EACd,UAAU,EAAE,UAAU,EACtB,OAAO,GAAE,sBAA2B,GACnC,OAAO,CAAC,oBAAoB,CAAC;IA4C1B,eAAe,CAAC,CAAC,SAAS,WAAW,GAAG,oBAAoB,EAChE,WAAW,EAAE,CAAC,GACb,OAAO,CAAC,CAAC,CAAC;IAkBE,mBAAmB,CAChC,CAAC,SAAS,WAAW,GAAG,oBAAoB,EAC5C,YAAY,EAAE,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IAqB5B,WAAW,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAmB3D,OAAO,CAAC,aAAa,CAWpB;CACF"}
@@ -154,65 +154,32 @@ export class LegacyInjectedSolanaWalletAdapter extends BaseMessageSignerWalletAd
154
154
  }
155
155
  this.emit('disconnect');
156
156
  }
157
- /**
158
- * Send a transaction via sign-only + self-broadcast, NOT the provider's
159
- * `signAndSendTransaction`.
160
- *
161
- * WHY (ONC-249): in Coinbase/Base Wallet Legacy mode's in-app browser,
162
- * approving a `signAndSendTransaction` **reloads the page** at approval time
163
- * (`blur → pagehide(persisted=false) → fresh boot`). The pending promise dies
164
- * with the page, so the signature is never delivered — the flow hangs on
165
- * "Completing transfer…" even though the tx broadcasts and confirms on-chain
166
- * (silent success shown as failure). Probe-verified on device (iOS,
167
- * CoinbaseWalletRN/30.4.109): `signTransaction` (sign-only) does NOT reload;
168
- * `signAndSendTransaction` does. So we sign in the wallet, then broadcast
169
- * ourselves through the RPC `connection` (already a hard dep of every send).
170
- *
171
- * Scope: this applies only to wallets discovered via the `solana.injectedId`
172
- * metadata fallback (today: Coinbase/Base Wallet Legacy mode). Wallet-Standard,
173
- * WalletConnect, EVM, TRON and TON paths are untouched. Trade-off: we own the
174
- * broadcast; the wallet no longer rebroadcasts.
175
- *
176
- * Shape mirrors `@solana/wallet-adapter-base` `BaseSignerWalletAdapter`
177
- * (sign → serialize → `sendRawTransaction`), including its `emit` flag so a
178
- * signing failure (incl. user rejection) surfaces as the original
179
- * `WalletSignTransactionError` — a rejection, not a generic send error — and
180
- * is not double-emitted (`signTransaction` already emitted it).
181
- */
182
157
  async sendTransaction(transaction, connection, options = {}) {
183
- let emit = true;
184
158
  try {
185
159
  const wallet = this._wallet;
186
160
  if (!wallet)
187
161
  throw new WalletNotConnectedError();
188
- const { signers, ...sendOptions } = options;
189
- if (isVersionedTransaction(transaction)) {
190
- if (signers?.length)
191
- transaction.sign(signers);
192
- }
193
- else {
194
- if (!transaction.recentBlockhash) {
195
- transaction = (await this.prepareTransaction(transaction, connection, sendOptions));
196
- }
197
- if (signers?.length)
198
- transaction.partialSign(...signers);
199
- }
200
- if (!sendOptions.preflightCommitment && connection.commitment) {
201
- sendOptions.preflightCommitment = connection.commitment;
202
- }
203
162
  try {
204
- const signedTransaction = await this.signTransaction(transaction);
205
- return await connection.sendRawTransaction(signedTransaction.serialize(), sendOptions);
163
+ const { signers, ...sendOptions } = options;
164
+ if (isVersionedTransaction(transaction)) {
165
+ if (signers?.length)
166
+ transaction.sign(signers);
167
+ }
168
+ else {
169
+ if (!transaction.recentBlockhash) {
170
+ transaction = (await this.prepareTransaction(transaction, connection, sendOptions));
171
+ }
172
+ if (signers?.length)
173
+ transaction.partialSign(...signers);
174
+ }
175
+ if (!sendOptions.preflightCommitment && connection.commitment) {
176
+ sendOptions.preflightCommitment = connection.commitment;
177
+ }
178
+ const { signature } = await wallet.signAndSendTransaction(transaction, sendOptions);
179
+ return signature;
206
180
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
207
181
  }
208
182
  catch (error) {
209
- // `signTransaction` already emitted and classified this — rethrow as-is
210
- // so the rejection is preserved and not re-emitted downstream.
211
- if (error instanceof WalletSignTransactionError) {
212
- emit = false;
213
- throw error;
214
- }
215
- // Anything past signing is a broadcast failure (RPC) → send error.
216
183
  if (error instanceof WalletError)
217
184
  throw error;
218
185
  throw new WalletSendTransactionError(error?.message, error);
@@ -220,8 +187,7 @@ export class LegacyInjectedSolanaWalletAdapter extends BaseMessageSignerWalletAd
220
187
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
221
188
  }
222
189
  catch (error) {
223
- if (emit)
224
- this.emit('error', error);
190
+ this.emit('error', error);
225
191
  throw error;
226
192
  }
227
193
  }
@@ -1 +1 @@
1
- {"version":3,"file":"legacy-injected-solana-adapter.js","sourceRoot":"","sources":["../src/legacy-injected-solana-adapter.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,8BAA8B,EAC9B,sBAAsB,EACtB,6BAA6B,EAC7B,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,WAAW,EACX,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,0BAA0B,EAC1B,0BAA0B,EAC1B,sBAAsB,EACvB,MAAM,6BAA6B,CAAA;AASpC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AA4B3C;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,UAAkB;IACxD,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO,SAAS,CAAA;IACnD,OAAO,UAAU;SACd,KAAK,CAAC,GAAG,CAAC;SACV,MAAM,CACL,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CACZ,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAE,GAA+B,CAAC,IAAI,CAAC,EAClE,MAA4C,CAC7C,CAAA;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,8BAA8B,CAC5C,KAAc;IAEd,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IACrD,MAAM,CAAC,GAAG,KAAgC,CAAA;IAC1C,MAAM,QAAQ,GAAG;QACf,SAAS;QACT,YAAY;QACZ,IAAI;QACJ,KAAK;QACL,iBAAiB;QACjB,qBAAqB;QACrB,aAAa;QACb,wBAAwB;KACzB,CAAA;IACD,OAA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AAC,GAAG,CAAC,YAAY,EAAE,IAAI,CAAC,aAAa,CAAC,CAAA;YAE5C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA;YACnB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAA;YAEtB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,uBAAuB,EAAE,CAAC,CAAA;YACjD,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;QACzB,CAAC;IACH,CAAC,CAAA;CACF"}
1
+ {"version":3,"file":"legacy-injected-solana-adapter.js","sourceRoot":"","sources":["../src/legacy-injected-solana-adapter.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,8BAA8B,EAC9B,sBAAsB,EACtB,6BAA6B,EAC7B,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,WAAW,EACX,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,0BAA0B,EAC1B,0BAA0B,EAC1B,sBAAsB,EACvB,MAAM,6BAA6B,CAAA;AASpC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AA4B3C;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,UAAkB;IACxD,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO,SAAS,CAAA;IACnD,OAAO,UAAU;SACd,KAAK,CAAC,GAAG,CAAC;SACV,MAAM,CACL,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CACZ,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAE,GAA+B,CAAC,IAAI,CAAC,EAClE,MAA4C,CAC7C,CAAA;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,8BAA8B,CAC5C,KAAc;IAEd,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IACrD,MAAM,CAAC,GAAG,KAAgC,CAAA;IAC1C,MAAM,QAA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AI,CAAC,OAAO,EAAE,IAAI,uBAAuB,EAAE,CAAC,CAAA;YACjD,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;QACzB,CAAC;IACH,CAAC,CAAA;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshconnect/uwc-injected-connector",
3
- "version": "0.20.0-snapshot.e930396",
3
+ "version": "0.20.1",
4
4
  "description": "Injected connector for Universal Wallet Connector",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -27,11 +27,11 @@
27
27
  "buffer": "^6.0.3",
28
28
  "uuid": "^13.0.0",
29
29
  "viem": "^2.54.6",
30
- "@meshconnect/uwc-constants": "0.7.0-snapshot.e930396",
31
- "@meshconnect/uwc-tron-connector": "0.5.4-snapshot.e930396",
32
- "@meshconnect/uwc-ton-connector": "0.7.6-snapshot.e930396",
33
- "@meshconnect/uwc-types": "0.23.0-snapshot.e930396",
34
- "@meshconnect/uwc-bridge-child": "0.3.0-snapshot.e930396"
30
+ "@meshconnect/uwc-bridge-child": "0.3.1",
31
+ "@meshconnect/uwc-constants": "0.7.0",
32
+ "@meshconnect/uwc-ton-connector": "0.7.6",
33
+ "@meshconnect/uwc-tron-connector": "0.5.4",
34
+ "@meshconnect/uwc-types": "0.23.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "typescript": "^5.9.3"
@@ -325,100 +325,16 @@ describe('LegacyInjectedSolanaWalletAdapter (generic, metadata-driven)', () => {
325
325
  const sig = await adapter.signMessage(new Uint8Array([1]))
326
326
  expect(sig).toEqual(new Uint8Array([4, 5, 6]))
327
327
  })
328
- })
329
-
330
- // ONC-249: sendTransaction must sign-only + self-broadcast (NOT
331
- // signAndSendTransaction, which reloads the page in CB/Base Legacy in-app
332
- // browser and loses the response).
333
- describe('sendTransaction (sign-only + self-broadcast)', () => {
334
- let tx: any
335
- let connection: any
336
-
337
- beforeEach(() => {
338
- tx = {
339
- recentBlockhash: 'blockhash',
340
- serialize: vi.fn(() => new Uint8Array([9, 9, 9]))
341
- }
342
- connection = {
343
- commitment: 'confirmed',
344
- sendRawTransaction: vi.fn().mockResolvedValue('broadcastSig')
345
- }
346
- })
347
-
348
- it('signs via the wallet then self-broadcasts through the RPC connection', async () => {
349
- const adapter = await createInstalledAdapter()
350
- await adapter.connect()
351
-
352
- const result = await adapter.sendTransaction(tx, connection)
353
-
354
- // Never uses the reload-triggering path.
355
- expect(mockWallet.signAndSendTransaction).not.toHaveBeenCalled()
356
- // Sign-only in the wallet, then broadcast ourselves.
357
- expect(mockWallet.signTransaction).toHaveBeenCalledWith(tx)
358
- expect(tx.serialize).toHaveBeenCalled()
359
- expect(connection.sendRawTransaction).toHaveBeenCalledWith(
360
- new Uint8Array([9, 9, 9]),
361
- expect.objectContaining({ preflightCommitment: 'confirmed' })
362
- )
363
- expect(result).toBe('broadcastSig')
364
- })
365
328
 
366
- it('applies signers at sign-time and strips them from broadcast options', async () => {
329
+ it('sendTransaction returns the provider signature', async () => {
367
330
  const adapter = await createInstalledAdapter()
368
331
  await adapter.connect()
369
-
370
- tx.partialSign = vi.fn()
371
- const signer = { publicKey: {}, secretKey: new Uint8Array() }
372
- await adapter.sendTransaction(tx, connection, {
373
- skipPreflight: true,
374
- maxRetries: 3,
375
- signers: [signer as any]
376
- })
377
-
378
- // signers are a sign-time concern, applied to the tx, never broadcast opts.
379
- expect(tx.partialSign).toHaveBeenCalledWith(signer)
380
- const passedOptions = connection.sendRawTransaction.mock.calls[0][1]
381
- expect(passedOptions).toMatchObject({
382
- skipPreflight: true,
383
- maxRetries: 3
384
- })
385
- expect(passedOptions).not.toHaveProperty('signers')
386
- })
387
-
388
- it('surfaces a user rejection at signing as a rejection, not a generic send error', async () => {
389
- const adapter = await createInstalledAdapter()
390
- await adapter.connect()
391
- mockWallet.signTransaction.mockRejectedValue(new Error('User rejected'))
392
-
393
- const errors: Error[] = []
394
- adapter.on('error', e => errors.push(e))
395
-
396
- await expect(adapter.sendTransaction(tx, connection)).rejects.toThrow(
397
- 'User rejected'
332
+ const result = await adapter.sendTransaction(
333
+ {} as any,
334
+ { commitment: 'confirmed' } as any
398
335
  )
399
- const rejected = await adapter
400
- .sendTransaction(tx, connection)
401
- .catch(e => e)
402
- expect(rejected.name).toBe('WalletSignTransactionError')
403
- expect(rejected.name).not.toBe('WalletSendTransactionError')
404
- // We must never reach broadcast if signing failed.
405
- expect(connection.sendRawTransaction).not.toHaveBeenCalled()
406
- // signTransaction emits once; sendTransaction must NOT re-emit (emit flag).
407
- expect(errors).toHaveLength(2) // one per attempt above, not doubled
408
- })
409
-
410
- it('wraps an RPC broadcast failure as a send error', async () => {
411
- const adapter = await createInstalledAdapter()
412
- await adapter.connect()
413
- connection.sendRawTransaction.mockRejectedValue(
414
- new Error('blockhash not found')
415
- )
416
-
417
- const rejected = await adapter
418
- .sendTransaction(tx, connection)
419
- .catch(e => e)
420
- expect(mockWallet.signTransaction).toHaveBeenCalled()
421
- expect(rejected.name).toBe('WalletSendTransactionError')
336
+ expect(mockWallet.signAndSendTransaction).toHaveBeenCalled()
337
+ expect(result).toBe('mockSig')
422
338
  })
423
339
  })
424
340
  })
@@ -245,83 +245,50 @@ export class LegacyInjectedSolanaWalletAdapter extends BaseMessageSignerWalletAd
245
245
  this.emit('disconnect')
246
246
  }
247
247
 
248
- /**
249
- * Send a transaction via sign-only + self-broadcast, NOT the provider's
250
- * `signAndSendTransaction`.
251
- *
252
- * WHY (ONC-249): in Coinbase/Base Wallet Legacy mode's in-app browser,
253
- * approving a `signAndSendTransaction` **reloads the page** at approval time
254
- * (`blur → pagehide(persisted=false) → fresh boot`). The pending promise dies
255
- * with the page, so the signature is never delivered — the flow hangs on
256
- * "Completing transfer…" even though the tx broadcasts and confirms on-chain
257
- * (silent success shown as failure). Probe-verified on device (iOS,
258
- * CoinbaseWalletRN/30.4.109): `signTransaction` (sign-only) does NOT reload;
259
- * `signAndSendTransaction` does. So we sign in the wallet, then broadcast
260
- * ourselves through the RPC `connection` (already a hard dep of every send).
261
- *
262
- * Scope: this applies only to wallets discovered via the `solana.injectedId`
263
- * metadata fallback (today: Coinbase/Base Wallet Legacy mode). Wallet-Standard,
264
- * WalletConnect, EVM, TRON and TON paths are untouched. Trade-off: we own the
265
- * broadcast; the wallet no longer rebroadcasts.
266
- *
267
- * Shape mirrors `@solana/wallet-adapter-base` `BaseSignerWalletAdapter`
268
- * (sign → serialize → `sendRawTransaction`), including its `emit` flag so a
269
- * signing failure (incl. user rejection) surfaces as the original
270
- * `WalletSignTransactionError` — a rejection, not a generic send error — and
271
- * is not double-emitted (`signTransaction` already emitted it).
272
- */
273
248
  override async sendTransaction<T extends Transaction | VersionedTransaction>(
274
249
  transaction: T,
275
250
  connection: Connection,
276
251
  options: SendTransactionOptions = {}
277
252
  ): Promise<TransactionSignature> {
278
- let emit = true
279
253
  try {
280
254
  const wallet = this._wallet
281
255
  if (!wallet) throw new WalletNotConnectedError()
282
256
 
283
- const { signers, ...sendOptions } = options
257
+ try {
258
+ const { signers, ...sendOptions } = options
259
+
260
+ if (isVersionedTransaction(transaction)) {
261
+ if (signers?.length) transaction.sign(signers)
262
+ } else {
263
+ if (!(transaction as Transaction).recentBlockhash) {
264
+ transaction = (await this.prepareTransaction(
265
+ transaction,
266
+ connection,
267
+ sendOptions
268
+ )) as T
269
+ }
284
270
 
285
- if (isVersionedTransaction(transaction)) {
286
- if (signers?.length) transaction.sign(signers)
287
- } else {
288
- if (!(transaction as Transaction).recentBlockhash) {
289
- transaction = (await this.prepareTransaction(
290
- transaction,
291
- connection,
292
- sendOptions
293
- )) as T
271
+ if (signers?.length)
272
+ (transaction as Transaction).partialSign(...signers)
294
273
  }
295
274
 
296
- if (signers?.length)
297
- (transaction as Transaction).partialSign(...signers)
298
- }
299
-
300
- if (!sendOptions.preflightCommitment && connection.commitment) {
301
- sendOptions.preflightCommitment = connection.commitment
302
- }
275
+ if (!sendOptions.preflightCommitment && connection.commitment) {
276
+ sendOptions.preflightCommitment = connection.commitment
277
+ }
303
278
 
304
- try {
305
- const signedTransaction = await this.signTransaction(transaction)
306
- return await connection.sendRawTransaction(
307
- signedTransaction.serialize(),
279
+ const { signature } = await wallet.signAndSendTransaction(
280
+ transaction,
308
281
  sendOptions
309
282
  )
283
+ return signature
310
284
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
311
285
  } catch (error: any) {
312
- // `signTransaction` already emitted and classified this — rethrow as-is
313
- // so the rejection is preserved and not re-emitted downstream.
314
- if (error instanceof WalletSignTransactionError) {
315
- emit = false
316
- throw error
317
- }
318
- // Anything past signing is a broadcast failure (RPC) → send error.
319
286
  if (error instanceof WalletError) throw error
320
287
  throw new WalletSendTransactionError(error?.message, error)
321
288
  }
322
289
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
323
290
  } catch (error: any) {
324
- if (emit) this.emit('error', error)
291
+ this.emit('error', error)
325
292
  throw error
326
293
  }
327
294
  }