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:
odiinnn committed 2025-09-17 12:40:02 +03:00
1 parent 42bbb746a1
commit e2c815caca
3 files changed
+2 -4

No files matched your search

-1
View File
@@ -9,7 +9,6 @@ export type WalletStorage = Storage;
export type InjectionConfig = {
callbackUrl: string;
isDev?: boolean;
connectTimeout?: number;
}
-1
View File
@@ -3,7 +3,6 @@ import { Wallet } from './wallet';
const defaultInjectionConfig: Required<InjectionConfig> = {
callbackUrl: '',
isDev: false,
connectTimeout: 30_000,
}
+2 -2
View File
@@ -16,9 +16,9 @@ export class Wallet implements InjectedWindowProvider {
constructor(
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.callbackUrl = callbackUrl;
this.connectTimeout = connectTimeout;