Skip to content

Commit

Permalink
debug wc sending (#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
BitHighlander authored Jun 16, 2023
1 parent ad3bc73 commit 0547d80
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ export class LegacyWCService {
disconnect = async () => {
console.log(this.connector.connected)
console.log(this.connector.session)
await this.connector.killSession()
this.connector.off('send')
this.connector.off('connect')
this.connector.off('call_request')
this.connector.off('session_request')
this.connector.off('wallet_switchEthereumChain')
this.connector.off('wallet_addEthereumChain')
this.connector.killSession()
}

private subscribeToEvents() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,11 @@ export const WalletConnectBridgeProvider: FC<PropsWithChildren> = ({ children })
}, [currentSessionTopic, isLegacy, legacyBridge, rerender])

useEffect(() => {
if (!WalletConnectSignClient) return
WalletConnectSignClient.on('session_ping', payload => {
if (!WalletConnectSignClient) {
console.log('no wallet connect sign client')
return
}
WalletConnectSignClient.on('session_ping', (payload: { topic: any }) => {
setIsConnected(true)
setCurrentSessionTopic(payload.topic)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export const SendTransactionConfirmation = () => {
)
txInput['gasPrice'] = Web3.utils.toHex(web3GasFeeData)

if (!address) return <>No address</>
//if (!address) return <>No address</>

return (
<FormProvider {...form}>
Expand Down
2 changes: 1 addition & 1 deletion packages/keepkey-sdk-server/src/controllers/ethereum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class EthereumController extends ApiController {
console.log('Body: ', body)
assume<{ maxFeePerGas?: string | null }>(body)
assume<{ gasPrice?: string | null }>(body)

if(body.chainId === 0) body.chainId = 1
const account = await this.context.getAccount(body.from)
if(!body.to) body.to = '0x'
let chainId: number
Expand Down

0 comments on commit 0547d80

Please sign in to comment.