Skip to content

Commit c719442

Browse files
add more logs for debugging
1 parent dc8269d commit c719442

File tree

10 files changed

+14
-2
lines changed

10 files changed

+14
-2
lines changed

packages/adapters/metamask-adapter/src/metamaskAdapter.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
CONNECTED_EVENT_DATA,
1515
CustomChainConfig,
1616
getChainConfig,
17+
log,
1718
SafeEventEmitterProvider,
1819
UserInfo,
1920
WALLET_ADAPTERS,
@@ -68,6 +69,7 @@ class MetamaskAdapter extends BaseAdapter<void> {
6869
this.status = ADAPTER_STATUS.READY;
6970
this.emit(ADAPTER_EVENTS.READY, WALLET_ADAPTERS.METAMASK);
7071
try {
72+
log.debug("initializing metamask adapter");
7173
if (options.autoConnect) {
7274
this.rehydrated = true;
7375
await this.connect();

packages/adapters/openlogin-adapter/src/openloginAdapter.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,15 @@ export class OpenloginAdapter extends BaseAdapter<OpenloginLoginParams> {
105105
replaceUrlOnRedirect: isRedirectResult,
106106
};
107107
this.openloginInstance = new OpenLogin(this.openloginOptions);
108+
log.debug("initializing openlogin adapter init");
108109

109110
await this.openloginInstance.init();
110111

111112
this.status = ADAPTER_STATUS.READY;
112113
this.emit(ADAPTER_EVENTS.READY, WALLET_ADAPTERS.OPENLOGIN);
113114

114115
try {
116+
log.debug("initializing openlogin adapter");
115117
// connect only if it is redirect result or if connect (adapter is cached/already connected in same session) is true
116118
if (this.openloginInstance.privKey && (options.autoConnect || isRedirectResult)) {
117119
await this.connect();

packages/adapters/phantom-adapter/src/phantomAdapter.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export class PhantomAdapter extends BaseAdapter<void> {
7777
this.emit(ADAPTER_EVENTS.READY, WALLET_ADAPTERS.PHANTOM);
7878

7979
try {
80+
log.debug("initializing phantom adapter");
8081
if (options.autoConnect) {
8182
this.rehydrated = true;
8283
await this.connect();

packages/adapters/slope-adapter/src/slopeAdapter.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export class SlopeAdapter extends BaseAdapter<void> {
7878
this.emit(ADAPTER_EVENTS.READY, WALLET_ADAPTERS.SLOPE);
7979

8080
try {
81+
log.debug("initializing slope adapter");
8182
if (options.autoConnect) {
8283
this.rehydrated = true;
8384
await this.connect();

packages/adapters/solflare-adapter/src/solflareAdapter.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export class SolflareAdapter extends BaseAdapter<void> {
7474
this.emit(ADAPTER_EVENTS.READY, WALLET_ADAPTERS.SOLFLARE);
7575

7676
try {
77+
log.debug("initializing solflare adapter");
7778
if (options.autoConnect) {
7879
this.rehydrated = true;
7980
await this.connect();

packages/adapters/sollet-adapter/src/baseSolletAdapter.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export class BaseSolletAdapter extends BaseAdapter<void> {
8181
this.emit(ADAPTER_EVENTS.READY, this.name);
8282

8383
try {
84+
log.debug("initializing sollet adapter");
8485
if (options.autoConnect) {
8586
this.rehydrated = true;
8687
await this.connect();

packages/adapters/torus-evm-adapter/src/torusWalletAdapter.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export class TorusWalletAdapter extends BaseAdapter<never> {
8383
network = { chainId: parseInt(chainId as string, 16), host: rpcTarget, blockExplorer, networkName: displayName };
8484
}
8585
this.torusInstance = new Torus(this.torusWalletOptions);
86+
log.debug("initializing torus evm adapter init");
8687
await this.torusInstance.init({
8788
showTorusButton: false,
8889
...this.initParams,
@@ -92,6 +93,7 @@ export class TorusWalletAdapter extends BaseAdapter<never> {
9293
this.emit(ADAPTER_EVENTS.READY, WALLET_ADAPTERS.TORUS_EVM);
9394

9495
try {
96+
log.debug("initializing torus evm adapter");
9597
if (options.autoConnect) {
9698
this.rehydrated = true;
9799
await this.connect();

packages/adapters/torus-solana-adapter/src/solanaWalletAdapter.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export class SolanaWalletAdapter extends BaseAdapter<void> {
8686
network = { chainId, rpcTarget, blockExplorerUrl: blockExplorer, displayName, tickerName, ticker, logo: "" };
8787
}
8888
this.torusInstance = new Torus(this.torusWalletOptions);
89+
log.debug("initializing torus solana adapter init");
8990
await this.torusInstance.init({ showTorusButton: false, ...this.initParams, network });
9091

9192
this.solanaProvider = new TorusInjectedProvider({
@@ -97,6 +98,7 @@ export class SolanaWalletAdapter extends BaseAdapter<void> {
9798
this.emit(ADAPTER_EVENTS.READY, WALLET_ADAPTERS.TORUS_SOLANA);
9899

99100
try {
101+
log.debug("initializing torus solana adapter");
100102
if (options.autoConnect) {
101103
this.rehydrated = true;
102104
await this.connect();

packages/adapters/wallet-connect-v1-adapter/src/walletConnectV1adapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class WalletConnectV1Adapter extends BaseAdapter<void> {
8080

8181
this.emit(ADAPTER_EVENTS.READY, WALLET_ADAPTERS.WALLET_CONNECT_V1);
8282
this.status = ADAPTER_STATUS.READY;
83-
83+
log.debug("initializing wallet connect v1 adapter");
8484
if (this.connector.connected) {
8585
this.rehydrated = true;
8686
await this.onConnectHandler({ accounts: this.connector.accounts, chainId: this.connector.chainId });

packages/ui/src/components/ExternalWallets.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default function ExternalWallet(props: ExternalWalletsProps) {
2121
const [isLoaded, setIsLoaded] = useState(false);
2222

2323
useEffect(() => {
24-
log.debug("loaded external wallets", config);
24+
log.debug("loaded external wallets", config, walletConnectUri);
2525
const wcAvailable = (config[WALLET_ADAPTERS.WALLET_CONNECT_V1]?.showOnModal || false) !== false;
2626
if (wcAvailable && !walletConnectUri) {
2727
handleExternalWalletClick({ adapter: WALLET_ADAPTERS.WALLET_CONNECT_V1 });

0 commit comments

Comments
 (0)