-
Notifications
You must be signed in to change notification settings - Fork 27
Description
I would like to suggest a few improvements to your adapters, as I’ve encountered some issues in their current implementation.
-
WalletConnect Adapter.
On the Tron network, in addition to transaction data, we can also include a text description. However, to enable this, your signTransaction function needs to be modified.
To fix this, please change the following line:
return yield wallet.signTransaction({ transaction });
to:
return yield wallet.signTransaction(transaction);
-
Bybit Adapter.
a) You are throwing errors that are very difficult to work with — I can't properly retrieve either the error code or the message.
To solve this issue, I suggest modifying the code, using the signTransaction function as an example.
To fix this, please change the following line:
catch (error) {
if (error instanceof Error) {
throw new WalletSignTransactionError(error.message, error);
} else {
throw new WalletSignTransactionError(error, new Error(error));
}
}
to:
catch (error) {
throw error;
}
b) The deeplink that should redirect the user from a regular browser to the Web3 wallet's built-in browser is incorrectly structured.
It opens the wallet app, but does not open the website inside the in-app browser.
To fix this, please change the following line:
window.location.href =
https://app.bybit.com/inapp?by_dp=${encodeURIComponent('bybitapp://open/route?targetUrl=by%3A%2F%2Fweb3%2Ftab%2Findex%3Findex%3D0')}&by_web_link=${encodeURIComponent(window.location.href)}`;`
to:
window.location.href =
https://app.bybit.com/inapp?by_dp=${encodeURIComponent('bybitapp://open/route?targetUrl=' + encodeURIComponent(window.location.href))}&by_web_link=${encodeURIComponent(window.location.href)};
Metadata
Metadata
Assignees
Labels
Type
Projects
Status