FRE-600: Fix code review blockers

- Consolidated duplicate UndoManagers to single instance
- Fixed connection promise to only resolve on 'connected' status
- Fixed WebSocketProvider import (WebsocketProvider)
- Added proper doc.destroy() cleanup
- Renamed isPresenceInitialized property to avoid conflict

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-04-25 00:08:01 -04:00
parent 65b552bb08
commit 7c684a42cc
48450 changed files with 5679671 additions and 383 deletions

98
node_modules/@wallet-standard/features/src/connect.ts generated vendored Normal file
View File

@@ -0,0 +1,98 @@
import type { WalletAccount } from '@wallet-standard/base';
/** Name of the feature. */
export const StandardConnect = 'standard:connect';
/**
* @deprecated Use {@link StandardConnect} instead.
*
* @group Deprecated
*/
export const Connect = StandardConnect;
/**
* `standard:connect` is a {@link "@wallet-standard/base".Wallet.features | feature} that may be implemented by a
* {@link "@wallet-standard/base".Wallet} to allow the app to obtain authorization to use
* {@link "@wallet-standard/base".Wallet.accounts}.
*
* @group Connect
*/
export type StandardConnectFeature = {
/** Name of the feature. */
readonly [StandardConnect]: {
/** Version of the feature implemented by the Wallet. */
readonly version: StandardConnectVersion;
/** Method to call to use the feature. */
readonly connect: StandardConnectMethod;
};
};
/**
* @deprecated Use {@link StandardConnectFeature} instead.
*
* @group Deprecated
*/
export type ConnectFeature = StandardConnectFeature;
/**
* Version of the {@link StandardConnectFeature} implemented by a {@link "@wallet-standard/base".Wallet}.
*
* @group Connect
*/
export type StandardConnectVersion = '1.0.0';
/**
* @deprecated Use {@link StandardConnectVersion} instead.
*
* @group Deprecated
*/
export type ConnectVersion = StandardConnectVersion;
/**
* Method to call to use the {@link StandardConnectFeature}.
*
* @group Connect
*/
export type StandardConnectMethod = (input?: StandardConnectInput) => Promise<StandardConnectOutput>;
/**
* @deprecated Use {@link StandardConnectMethod} instead.
*
* @group Deprecated
*/
export type ConnectMethod = StandardConnectMethod;
/**
* Input for the {@link StandardConnectMethod}.
*
* @group Connect
*/
export interface StandardConnectInput {
/**
* By default, using the {@link StandardConnectFeature} should prompt the user to request authorization to accounts.
* Set the `silent` flag to `true` to request accounts that have already been authorized without prompting.
*
* This flag may or may not be used by the Wallet and the app should not depend on it being used.
* If this flag is used by the Wallet, the Wallet should not prompt the user, and should return only the accounts
* that the app is authorized to use.
*/
readonly silent?: boolean;
}
/**
* @deprecated Use {@link StandardConnectInput} instead.
*
* @group Deprecated
*/
export type ConnectInput = StandardConnectInput;
/**
* Output of the {@link StandardConnectMethod}.
*
* @group Connect
*/
export interface StandardConnectOutput {
/** List of accounts in the {@link "@wallet-standard/base".Wallet} that the app has been authorized to use. */
readonly accounts: readonly WalletAccount[];
}
/**
* @deprecated Use {@link StandardConnectOutput} instead.
*
* @group Deprecated
*/
export type ConnectOutput = StandardConnectOutput;

View File

@@ -0,0 +1,60 @@
/** Name of the feature. */
export const StandardDisconnect = 'standard:disconnect';
/**
* @deprecated Use {@link StandardDisconnect} instead.
*
* @group Deprecated
*/
export const Disconnect = StandardDisconnect;
/**
* `standard:disconnect` is a {@link "@wallet-standard/base".Wallet.features | feature} that may be implemented by a
* {@link "@wallet-standard/base".Wallet} to allow the app to perform any cleanup work.
*
* This feature may or may not be used by the app and the Wallet should not depend on it being used.
* If this feature is used by the app, the Wallet should perform any cleanup work, but should not revoke authorization
* to use accounts previously granted through the {@link ConnectFeature}.
*
* @group Disconnect
*/
export type StandardDisconnectFeature = {
/** Name of the feature. */
readonly [StandardDisconnect]: {
/** Version of the feature implemented by the Wallet. */
readonly version: StandardDisconnectVersion;
/** Method to call to use the feature. */
readonly disconnect: StandardDisconnectMethod;
};
};
/**
* @deprecated Use {@link StandardDisconnectFeature} instead.
*
* @group Deprecated
*/
export type DisconnectFeature = StandardDisconnectFeature;
/**
* Version of the {@link StandardDisconnectFeature} implemented by a Wallet.
*
* @group Disconnect
*/
export type StandardDisconnectVersion = '1.0.0';
/**
* @deprecated Use {@link StandardDisconnectVersion} instead.
*
* @group Deprecated
*/
export type DisconnectVersion = StandardDisconnectVersion;
/**
* Method to call to use the {@link StandardDisconnectFeature}.
*
* @group Disconnect
*/
export type StandardDisconnectMethod = () => Promise<void>;
/**
* @deprecated Use {@link StandardDisconnectMethod} instead.
*
* @group Deprecated
*/
export type DisconnectMethod = StandardDisconnectMethod;

143
node_modules/@wallet-standard/features/src/events.ts generated vendored Normal file
View File

@@ -0,0 +1,143 @@
import type { Wallet } from '@wallet-standard/base';
/** Name of the feature. */
export const StandardEvents = 'standard:events';
/**
* @deprecated Use {@link StandardEvents} instead.
*
* @group Deprecated
*/
export const Events = StandardEvents;
/**
* `standard:events` is a {@link "@wallet-standard/base".Wallet.features | feature} that may be implemented by a
* {@link "@wallet-standard/base".Wallet} to allow the app to add an event listener and subscribe to events emitted by
* the Wallet when properties of the Wallet {@link StandardEventsListeners.change}.
*
* @group Events
*/
export type StandardEventsFeature = {
/** Name of the feature. */
readonly [StandardEvents]: {
/** Version of the feature implemented by the {@link "@wallet-standard/base".Wallet}. */
readonly version: StandardEventsVersion;
/** Method to call to use the feature. */
readonly on: StandardEventsOnMethod;
};
};
/**
* @deprecated Use {@link StandardEventsFeature} instead.
*
* @group Deprecated
*/
export type EventsFeature = StandardEventsFeature;
/**
* Version of the {@link StandardEventsFeature} implemented by a {@link "@wallet-standard/base".Wallet}.
*
* @group Events
*/
export type StandardEventsVersion = '1.0.0';
/**
* @deprecated Use {@link StandardEventsVersion} instead.
*
* @group Deprecated
*/
export type EventsVersion = StandardEventsVersion;
/**
* Method to call to use the {@link StandardEventsFeature}.
*
* @param event Event type to listen for. {@link StandardEventsListeners.change | `change`} is the only event type.
* @param listener Function that will be called when an event of the type is emitted.
*
* @return
* `off` function which may be called to remove the event listener and unsubscribe from events.
*
* As with all event listeners, be careful to avoid memory leaks.
*
* @group Events
*/
export type StandardEventsOnMethod = <E extends StandardEventsNames>(
event: E,
listener: StandardEventsListeners[E]
) => () => void;
/**
* @deprecated Use {@link StandardEventsOnMethod} instead.
*
* @group Deprecated
*/
export type EventsOnMethod = StandardEventsOnMethod;
/**
* Types of event listeners of the {@link StandardEventsFeature}.
*
* @group Events
*/
export interface StandardEventsListeners {
/**
* Listener that will be called when {@link StandardEventsChangeProperties | properties} of the
* {@link "@wallet-standard/base".Wallet} have changed.
*
* @param properties Properties that changed with their **new** values.
*/
change(properties: StandardEventsChangeProperties): void;
}
/**
* @deprecated Use {@link StandardEventsListeners} instead.
*
* @group Deprecated
*/
export type EventsListeners = StandardEventsListeners;
/**
* Names of {@link StandardEventsListeners} that can be listened for.
*
* @group Events
*/
export type StandardEventsNames = keyof StandardEventsListeners;
/**
* @deprecated Use {@link StandardEventsNames} instead.
*
* @group Deprecated
*/
export type EventsNames = StandardEventsNames;
/**
* Properties of a {@link "@wallet-standard/base".Wallet} that {@link StandardEventsListeners.change | changed} with their
* **new** values.
*
* @group Events
*/
export interface StandardEventsChangeProperties {
/**
* {@link "@wallet-standard/base".Wallet.chains | Chains} supported by the Wallet.
*
* The Wallet should only define this field if the value of the property has changed.
*
* The value must be the **new** value of the property.
*/
readonly chains?: Wallet['chains'];
/**
* {@link "@wallet-standard/base".Wallet.features | Features} supported by the Wallet.
*
* The Wallet should only define this field if the value of the property has changed.
*
* The value must be the **new** value of the property.
*/
readonly features?: Wallet['features'];
/**
* {@link "@wallet-standard/base".Wallet.accounts | Accounts} that the app is authorized to use.
*
* The Wallet should only define this field if the value of the property has changed.
*
* The value must be the **new** value of the property.
*/
readonly accounts?: Wallet['accounts'];
}
/**
* @deprecated Use {@link StandardEventsChangeProperties} instead.
*
* @group Deprecated
*/
export type EventsChangeProperties = StandardEventsChangeProperties;

23
node_modules/@wallet-standard/features/src/index.ts generated vendored Normal file
View File

@@ -0,0 +1,23 @@
import type { WalletWithFeatures } from '@wallet-standard/base';
import type { StandardConnectFeature } from './connect.js';
import type { StandardDisconnectFeature } from './disconnect.js';
import type { StandardEventsFeature } from './events.js';
/**
* Type alias for some or all {@link "@wallet-standard/base".Wallet.features} implemented within the reserved `standard`
* namespace.
*
* @group Features
*/
export type StandardFeatures = StandardConnectFeature | StandardDisconnectFeature | StandardEventsFeature;
/**
* Type alias for a {@link "@wallet-standard/base".Wallet} that implements some or all {@link StandardFeatures}.
*
* @group Features
*/
export type WalletWithStandardFeatures = WalletWithFeatures<StandardFeatures>;
export * from './connect.js';
export * from './disconnect.js';
export * from './events.js';