Socket
Socket
Sign inDemoInstall

@solana/wallet-adapter-base

Package Overview
Dependencies
Maintainers
14
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solana/wallet-adapter-base - npm Package Compare versions

Comparing version 0.9.17 to 0.9.18

14

lib/cjs/signer.js

@@ -31,8 +31,7 @@ "use strict";

try {
if ('message' in transaction) {
if ('version' in transaction) {
if (!this.supportedTransactionVersions)
throw new errors_js_1.WalletSendTransactionError(`Sending versioned transactions isn't supported by this wallet`);
const { version } = transaction.message;
if (!this.supportedTransactionVersions.has(version))
throw new errors_js_1.WalletSendTransactionError(`Sending transaction version ${version} isn't supported by this wallet`);
if (!this.supportedTransactionVersions.has(transaction.version))
throw new errors_js_1.WalletSendTransactionError(`Sending transaction version ${transaction.version} isn't supported by this wallet`);
try {

@@ -82,8 +81,7 @@ transaction = yield this.signTransaction(transaction);

for (const transaction of transactions) {
if ('message' in transaction) {
if ('version' in transaction) {
if (!this.supportedTransactionVersions)
throw new errors_js_1.WalletSignTransactionError(`Signing versioned transactions isn't supported by this wallet`);
const { version } = transaction.message;
if (!this.supportedTransactionVersions.has(version))
throw new errors_js_1.WalletSignTransactionError(`Signing transaction version ${version} isn't supported by this wallet`);
if (!this.supportedTransactionVersions.has(transaction.version))
throw new errors_js_1.WalletSignTransactionError(`Signing transaction version ${transaction.version} isn't supported by this wallet`);
}

@@ -90,0 +88,0 @@ }

@@ -7,8 +7,7 @@ import { BaseWalletAdapter } from './adapter.js';

try {
if ('message' in transaction) {
if ('version' in transaction) {
if (!this.supportedTransactionVersions)
throw new WalletSendTransactionError(`Sending versioned transactions isn't supported by this wallet`);
const { version } = transaction.message;
if (!this.supportedTransactionVersions.has(version))
throw new WalletSendTransactionError(`Sending transaction version ${version} isn't supported by this wallet`);
if (!this.supportedTransactionVersions.has(transaction.version))
throw new WalletSendTransactionError(`Sending transaction version ${transaction.version} isn't supported by this wallet`);
try {

@@ -56,8 +55,7 @@ transaction = await this.signTransaction(transaction);

for (const transaction of transactions) {
if ('message' in transaction) {
if ('version' in transaction) {
if (!this.supportedTransactionVersions)
throw new WalletSignTransactionError(`Signing versioned transactions isn't supported by this wallet`);
const { version } = transaction.message;
if (!this.supportedTransactionVersions.has(version))
throw new WalletSignTransactionError(`Signing transaction version ${version} isn't supported by this wallet`);
if (!this.supportedTransactionVersions.has(transaction.version))
throw new WalletSignTransactionError(`Signing transaction version ${transaction.version} isn't supported by this wallet`);
}

@@ -64,0 +62,0 @@ }

@@ -26,3 +26,3 @@ import type { Connection, PublicKey, SendOptions, Signer, Transaction, TransactionSignature } from '@solana/web3.js';

connected: boolean;
supportedTransactionVersions: SupportedTransactionVersions;
supportedTransactionVersions?: SupportedTransactionVersions;
connect(): Promise<void>;

@@ -68,3 +68,3 @@ disconnect(): Promise<void>;

abstract connecting: boolean;
abstract supportedTransactionVersions: SupportedTransactionVersions;
abstract supportedTransactionVersions?: SupportedTransactionVersions;
get connected(): boolean;

@@ -71,0 +71,0 @@ abstract connect(): Promise<void>;

@@ -10,4 +10,4 @@ import type { Transaction, TransactionVersion, VersionedTransaction } from '@solana/web3.js';

}
export declare type SupportedTransactionVersions = Set<TransactionVersion> | null;
export declare type TransactionOrVersionedTransaction<S extends SupportedTransactionVersions> = S extends null ? Transaction : Transaction | VersionedTransaction;
export declare type SupportedTransactionVersions = ReadonlySet<TransactionVersion> | null | undefined;
export declare type TransactionOrVersionedTransaction<S extends SupportedTransactionVersions> = S extends null | undefined ? Transaction : Transaction | VersionedTransaction;
//# sourceMappingURL=types.d.ts.map
{
"name": "@solana/wallet-adapter-base",
"version": "0.9.17",
"version": "0.9.18",
"author": "Solana Maintainers <maintainers@solana.foundation>",

@@ -5,0 +5,0 @@ "repository": "https://github.com/solana-labs/wallet-adapter",

@@ -32,3 +32,3 @@ import type { Connection, PublicKey, SendOptions, Signer, Transaction, TransactionSignature } from '@solana/web3.js';

connected: boolean;
supportedTransactionVersions: SupportedTransactionVersions;
supportedTransactionVersions?: SupportedTransactionVersions;

@@ -86,3 +86,3 @@ connect(): Promise<void>;

abstract connecting: boolean;
abstract supportedTransactionVersions: SupportedTransactionVersions;
abstract supportedTransactionVersions?: SupportedTransactionVersions;

@@ -89,0 +89,0 @@ get connected() {

@@ -29,3 +29,3 @@ import type { Connection, TransactionSignature } from '@solana/web3.js';

try {
if ('message' in transaction) {
if ('version' in transaction) {
if (!this.supportedTransactionVersions)

@@ -36,6 +36,5 @@ throw new WalletSendTransactionError(

const { version } = transaction.message;
if (!this.supportedTransactionVersions.has(version))
if (!this.supportedTransactionVersions.has(transaction.version))
throw new WalletSendTransactionError(
`Sending transaction version ${version} isn't supported by this wallet`
`Sending transaction version ${transaction.version} isn't supported by this wallet`
);

@@ -95,3 +94,3 @@

for (const transaction of transactions) {
if ('message' in transaction) {
if ('version' in transaction) {
if (!this.supportedTransactionVersions)

@@ -102,6 +101,5 @@ throw new WalletSignTransactionError(

const { version } = transaction.message;
if (!this.supportedTransactionVersions.has(version))
if (!this.supportedTransactionVersions.has(transaction.version))
throw new WalletSignTransactionError(
`Signing transaction version ${version} isn't supported by this wallet`
`Signing transaction version ${transaction.version} isn't supported by this wallet`
);

@@ -108,0 +106,0 @@ }

@@ -13,6 +13,6 @@ import type { Transaction, TransactionVersion, VersionedTransaction } from '@solana/web3.js';

export type SupportedTransactionVersions = Set<TransactionVersion> | null;
export type SupportedTransactionVersions = ReadonlySet<TransactionVersion> | null | undefined;
export type TransactionOrVersionedTransaction<S extends SupportedTransactionVersions> = S extends null
export type TransactionOrVersionedTransaction<S extends SupportedTransactionVersions> = S extends null | undefined
? Transaction
: Transaction | VersionedTransaction;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc