fix(trading,wallet): set version for vega snap (#4991)

This commit is contained in:
Matthew Russell 2023-10-05 14:18:40 -04:00 committed by GitHub
parent 283f654a4c
commit c116762865
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -15,6 +15,7 @@ import { useCallback, useState } from 'react';
import type { WalletClientError } from '@vegaprotocol/wallet-client';
import { t } from '@vegaprotocol/i18n';
import type { Connectors, VegaConnector } from '../connectors';
import { DEFAULT_SNAP_VERSION } from '../connectors';
import {
DEFAULT_SNAP_ID,
InjectedConnector,
@ -352,7 +353,9 @@ const ConnectorList = ({
</>
}
onClick={() => {
requestSnap(DEFAULT_SNAP_ID);
requestSnap(DEFAULT_SNAP_ID, {
version: DEFAULT_SNAP_VERSION,
});
}}
/>
{snapStatus === SnapStatus.NOT_SUPPORTED ? (

View File

@ -41,6 +41,7 @@ const ethereumRequest = <T>(args: RequestArguments): Promise<T> => {
export const LOCAL_SNAP_ID = 'local:http://localhost:8080';
export const DEFAULT_SNAP_ID = 'npm:@vegaprotocol/snap';
export const DEFAULT_SNAP_VERSION = '0.2.0';
type GetSnapsResponse = Record<string, Snap>;