Skip to content

Commit

Permalink
Ignore ts error in WalletConnectV2 composable temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
ccali11 committed Jul 27, 2023
1 parent ed75881 commit 8b39e63
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion apps/web/src/composables/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function useWallet() {
// const { solanaProviderList, sendSolanaTransaction, signSolanaMessage } = useSolana()
const { getTrezorAddress, loginWithTrezor, sendTrezorTransaction, signTrezorMessage } = useTrezor()
const { addAccount, getUser, checkIfSecondaryAddress, checkIfPrimaryUserExists, removeAccount, setUser, setUserAnalytics, setUserAccountBalances, updatePrimaryAddress, user } = useUsers()
const { web3modal, getWalletConnectAddressAndBalance, loginWithWalletConnectV2 } = useWalletConnectV2()
const { web3modal, getWalletConnectAddressAndBalance, /* loginWithWalletConnectV2 */ } = useWalletConnectV2()

function getColdStorageAddress(provider: ProviderString, currency: Currency = 'ETH') {
if (provider === 'Ledger') {
Expand Down
34 changes: 17 additions & 17 deletions apps/web/src/composables/walletConnectV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@ export default function useWalletConnectV2() {
}
}

async function loginWithWalletConnectV2(loginCredentials: LoginCredentials) {
const { provider, address, currency } = loginCredentials
try {
const message = await createSiweMessage(address, 'Sign in with Ethereum to the app.')
const signedMessage = await signWalletConnectMessage({ message, providerString: provider })
await signInWithEthereum({
address,
currency: currency || 'ETH',
provider,
message,
signedMessage
})
} catch (err) {
console.log('error in loginWithWalletConnect :>> ', err)
}
}
// async function loginWithWalletConnectV2(loginCredentials: LoginCredentials) {
// const { provider, address, currency } = loginCredentials
// try {
// const message = await createSiweMessage(address, 'Sign in with Ethereum to the app.')
// const signedMessage = await signWalletConnectMessage({ message, providerString: provider })
// await signInWithEthereum({
// address,
// currency: currency || 'ETH',
// provider,
// message,
// signedMessage
// })
// } catch (err) {
// console.log('error in loginWithWalletConnect :>> ', err)
// }
// }

async function signWalletConnectMessage(messageRequest: MessageRequest) {
console.log('got to signWalletConnectMessage')
Expand All @@ -60,6 +60,6 @@ export default function useWalletConnectV2() {
return {
web3modal,
getWalletConnectAddressAndBalance,
loginWithWalletConnectV2
// loginWithWalletConnectV2
}
}

0 comments on commit 8b39e63

Please sign in to comment.