Skip to content

Commit

Permalink
fix: rename isPaired to isSafeMobileWallet (safe-global#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamacook authored Sep 12, 2022
1 parent 39b52ac commit 2793016
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/tx/SignOrExecuteForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import useGasLimit from '@/hooks/useGasLimit'
import useSafeInfo from '@/hooks/useSafeInfo'
import ErrorMessage from '@/components/tx/ErrorMessage'
import AdvancedParams, { type AdvancedParameters, useAdvancedParams } from '@/components/tx/AdvancedParams'
import { isHardwareWallet, isPaired } from '@/hooks/wallets/wallets'
import { isHardwareWallet, isSafeMobileWallet } from '@/hooks/wallets/wallets'
import DecodedTx from '../DecodedTx'
import ExecuteCheckbox from '../ExecuteCheckbox'
import { logError, Errors } from '@/services/exceptions'
Expand Down Expand Up @@ -88,7 +88,7 @@ const SignOrExecuteForm = ({
const onSign = async (): Promise<string> => {
const [connectedWallet, createdTx] = assertSubmittable()

const shouldEthSign = isHardwareWallet(connectedWallet) || isPaired(connectedWallet)
const shouldEthSign = isHardwareWallet(connectedWallet) || isSafeMobileWallet(connectedWallet)
const signedTx = await dispatchTxSigning(createdTx, shouldEthSign, txId)

const proposedTx = await dispatchTxProposal(safe.chainId, safeAddress, connectedWallet.address, signedTx, txId)
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/wallets/wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ export const isHardwareWallet = (wallet: ConnectedWallet): boolean => {
return [WALLET_KEYS.LEDGER, WALLET_KEYS.TREZOR].includes(wallet.label.toUpperCase() as WALLET_KEYS)
}

export const isPaired = (wallet: ConnectedWallet): boolean => {
export const isSafeMobileWallet = (wallet: ConnectedWallet): boolean => {
return wallet.label === PAIRING_MODULE_LABEL
}

0 comments on commit 2793016

Please sign in to comment.