Merge branch 'wallets'
This commit is contained in:
commit
bc74c8cfd9
@ -26,11 +26,11 @@ export default function useWalletConnectEventsManager(initialized: boolean) {
|
|||||||
const { method } = request
|
const { method } = request
|
||||||
const requestSession = await walletConnectClient.session.get(topic)
|
const requestSession = await walletConnectClient.session.get(topic)
|
||||||
|
|
||||||
|
console.log(method)
|
||||||
|
|
||||||
if ([EIP155_SIGNING_METHODS.ETH_SIGN, EIP155_SIGNING_METHODS.PERSONAL_SIGN].includes(method)) {
|
if ([EIP155_SIGNING_METHODS.ETH_SIGN, EIP155_SIGNING_METHODS.PERSONAL_SIGN].includes(method)) {
|
||||||
ModalStore.open('SessionSignModal', { requestEvent, requestSession })
|
ModalStore.open('SessionSignModal', { requestEvent, requestSession })
|
||||||
}
|
} else if (
|
||||||
|
|
||||||
if (
|
|
||||||
[
|
[
|
||||||
EIP155_SIGNING_METHODS.ETH_SIGN_TYPED_DATA,
|
EIP155_SIGNING_METHODS.ETH_SIGN_TYPED_DATA,
|
||||||
EIP155_SIGNING_METHODS.ETH_SIGN_TYPED_DATA_V3,
|
EIP155_SIGNING_METHODS.ETH_SIGN_TYPED_DATA_V3,
|
||||||
@ -38,9 +38,7 @@ export default function useWalletConnectEventsManager(initialized: boolean) {
|
|||||||
].includes(method)
|
].includes(method)
|
||||||
) {
|
) {
|
||||||
ModalStore.open('SessionSignTypedDataModal', { requestEvent, requestSession })
|
ModalStore.open('SessionSignTypedDataModal', { requestEvent, requestSession })
|
||||||
}
|
} else if (EIP155_SIGNING_METHODS.ETH_SEND_TRANSACTION) {
|
||||||
|
|
||||||
if (EIP155_SIGNING_METHODS.ETH_SEND_TRANSACTION) {
|
|
||||||
ModalStore.open('SessionSendTransactionModal', { requestEvent, requestSession })
|
ModalStore.open('SessionSendTransactionModal', { requestEvent, requestSession })
|
||||||
}
|
}
|
||||||
}, [])
|
}, [])
|
||||||
|
@ -4,7 +4,7 @@ import { utils } from 'ethers'
|
|||||||
* Truncates string (in the middle) via given lenght value
|
* Truncates string (in the middle) via given lenght value
|
||||||
*/
|
*/
|
||||||
export function truncate(value: string, length: number) {
|
export function truncate(value: string, length: number) {
|
||||||
if (value.length <= length) {
|
if (value?.length <= length) {
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,8 +38,6 @@ export default function SessionSendTransactionModal() {
|
|||||||
const { name, icons, url } = requestSession.peer.metadata
|
const { name, icons, url } = requestSession.peer.metadata
|
||||||
const transaction = params[0]
|
const transaction = params[0]
|
||||||
|
|
||||||
console.log(transaction)
|
|
||||||
|
|
||||||
// Handle approve action
|
// Handle approve action
|
||||||
async function onApprove() {
|
async function onApprove() {
|
||||||
if (requestEvent) {
|
if (requestEvent) {
|
||||||
|
Loading…
Reference in New Issue
Block a user