Remove isDev property from InjectionConfig and defaultInjectionConfig, simplifying wallet configuration. Update Wallet class to reflect these changes, ensuring consistent handling of callbackUrl and connectTimeout.
This commit is contained in:
1 parent
42bbb746a1
commit
e2c815caca
3 files changed
+2
-4
No files matched your search
@@ -9,7 +9,6 @@ export type WalletStorage = Storage;
|
|||||||
|
|
||||||
export type InjectionConfig = {
|
export type InjectionConfig = {
|
||||||
callbackUrl: string;
|
callbackUrl: string;
|
||||||
isDev?: boolean;
|
|
||||||
connectTimeout?: number;
|
connectTimeout?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { Wallet } from './wallet';
|
|||||||
|
|
||||||
const defaultInjectionConfig: Required<InjectionConfig> = {
|
const defaultInjectionConfig: Required<InjectionConfig> = {
|
||||||
callbackUrl: '',
|
callbackUrl: '',
|
||||||
isDev: false,
|
|
||||||
connectTimeout: 30_000,
|
connectTimeout: 30_000,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -16,9 +16,9 @@ export class Wallet implements InjectedWindowProvider {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private readonly webApp: WebApp,
|
private readonly webApp: WebApp,
|
||||||
{ callbackUrl, isDev, connectTimeout }: Required<InjectionConfig>,
|
{ callbackUrl, connectTimeout }: Required<InjectionConfig>,
|
||||||
) {
|
) {
|
||||||
this.varanWalletUrl = isDev ? 'https://t.me/devReptileBot?startapp=' : 'https://t.me/varanwalletbot?startapp=';
|
this.varanWalletUrl = 'https://t.me/varanwalletbot?startapp=';
|
||||||
this.store = new WalletStore();
|
this.store = new WalletStore();
|
||||||
this.callbackUrl = callbackUrl;
|
this.callbackUrl = callbackUrl;
|
||||||
this.connectTimeout = connectTimeout;
|
this.connectTimeout = connectTimeout;
|
||||||
|
|||||||
Reference in new issue
Block a user