Update varanWalletUrl format and add logging for request encoding
- Changed the varanWalletUrl to use the correct Telegram bot URL format. - Added console logging for the encoded request and bot URL to assist with debugging.
This commit is contained in:
1 parent
b95b5ab914
commit
ed0637d08e
1 file changed
+3
-2
+3
-2
@@ -19,7 +19,7 @@ export class Wallet implements InjectedWindowProvider {
|
|||||||
private readonly webApp: WebApp,
|
private readonly webApp: WebApp,
|
||||||
{ callbackUrl, connectTimeout, closeAppOnActions }: Required<InjectionConfig>,
|
{ callbackUrl, connectTimeout, closeAppOnActions }: Required<InjectionConfig>,
|
||||||
) {
|
) {
|
||||||
this.varanWalletUrl = 'https://t.me/varanwalletbot?startapp=';
|
this.varanWalletUrl = 'https://t.me/varanwalletbot/start?startapp=';
|
||||||
this.store = new WalletStore();
|
this.store = new WalletStore();
|
||||||
this.callbackUrl = callbackUrl;
|
this.callbackUrl = callbackUrl;
|
||||||
this.connectTimeout = connectTimeout;
|
this.connectTimeout = connectTimeout;
|
||||||
@@ -160,8 +160,9 @@ export class Wallet implements InjectedWindowProvider {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const encodedRequest = encodeRequest(request);
|
const encodedRequest = encodeRequest(request);
|
||||||
|
console.log('encodedRequest', encodedRequest);
|
||||||
const botUrl = `${this.varanWalletUrl}${encodedRequest}`;
|
const botUrl = `${this.varanWalletUrl}${encodedRequest}`;
|
||||||
|
console.log('botUrl', botUrl);
|
||||||
await this.webApp.openTelegramLink(botUrl);
|
await this.webApp.openTelegramLink(botUrl);
|
||||||
|
|
||||||
return new Promise<void>((resolve) => {
|
return new Promise<void>((resolve) => {
|
||||||
|
|||||||
Reference in new issue
Block a user