Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/lazy-cats-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@solana/react': patch
---

Correct featureName in `signTransaction` error
6 changes: 6 additions & 0 deletions packages/react/src/__tests__/useSignTransaction-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ describe('useSignTransaction', () => {
supportedFeatures: ['solana:signTransaction'],
}),
);
expect(result.current).toMatchObject({
context: { featureName: 'solana:signTransaction' },
});
});
it('fatals when the wallet account lookup for the supplied React wallet account fails', () => {
jest.mocked(getWalletAccountForUiWalletAccount_DO_NOT_USE_OR_YOU_WILL_BE_FIRED).mockImplementation(() => {
Expand Down Expand Up @@ -181,6 +184,9 @@ describe('useSignTransaction', () => {
supportedFeatures: ['solana:signTransaction'],
}),
);
expect(result.current).toMatchObject({
context: { featureName: 'solana:signTransaction' },
});
});
});
});
3 changes: 1 addition & 2 deletions packages/react/src/useSignTransaction.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
SolanaSignAndSendTransaction,
SolanaSignTransaction,
SolanaSignTransactionFeature,
SolanaSignTransactionInput,
Expand Down Expand Up @@ -127,7 +126,7 @@ export function useSignTransactions<TWalletAccount extends UiWalletAccount>(
throw new WalletStandardError(WALLET_STANDARD_ERROR__FEATURES__WALLET_ACCOUNT_CHAIN_UNSUPPORTED, {
address: uiWalletAccount.address,
chain,
featureName: SolanaSignAndSendTransaction,
featureName: SolanaSignTransaction,
supportedChains: [...uiWalletAccount.chains],
supportedFeatures: [...uiWalletAccount.features],
});
Expand Down
Loading