Skip to content

Commit 1f4fb59

Browse files
committed
fix(transaction-pay-controller): add debug logging for Infura endpoint resolution
1 parent 9cf88d5 commit 1f4fb59

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

  • packages/transaction-pay-controller/src/utils

packages/transaction-pay-controller/src/utils/provider.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,13 @@ export function getNetworkClientId(
7171
if (infuraEndpoint) {
7272
return infuraEndpoint.networkClientId;
7373
}
74-
} catch {
75-
// empty
74+
75+
log('No Infura endpoint found for chain', {
76+
chainId,
77+
rpcEndpoints: networkConfiguration?.rpcEndpoints,
78+
});
79+
} catch (error) {
80+
log('Error looking up Infura endpoint', { chainId, error });
7681
}
7782
}
7883

@@ -109,7 +114,7 @@ export async function rpcRequest<TResponse = unknown>({
109114

110115
const response = await provider.request({ method, params });
111116

112-
log(method, { params, response });
117+
log(method, { chainId, networkClientId, params, response });
113118

114119
return response as TResponse;
115120
}

0 commit comments

Comments
 (0)