Skip to content

Commit

Permalink
Fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
Lbqds committed Oct 24, 2024
1 parent 96a5767 commit 2d9992a
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions packages/extension/src/background/actionHandlers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { binToHex, codec, groupIndexOfTransaction, hexToBinUnsafe, TransactionBuilder } from "@alephium/web3"
import { TransactionBuilder } from "@alephium/web3"
import { getAccounts } from "../shared/account/store"
import {
ActionItem,
Expand All @@ -15,8 +15,6 @@ import { BackgroundService } from "./background"
import { openUi } from "./openUi"
import { executeTransactionAction } from "./transactions/transactionExecution"
import { transactionWatcher } from "./transactions/transactionWatcher"
import blake from 'blakejs'
import { account } from "../../e2e/apis/account"

export const handleActionApproval = async (
action: ExtQueueItem<ActionItem>,
Expand Down Expand Up @@ -109,15 +107,14 @@ export const handleActionApproval = async (
case "ALPH_SIGN_UNSIGNED_TX": {
const { signatureOpt } = additionalData as { signatureOpt: string | undefined }
try {
const account = await wallet.getAccount({
address: action.payload.signerAddress,
networkId: action.payload.networkId,
})
if (!account) {
throw Error("No selected account")
}
if (signatureOpt === undefined) {
const account = await wallet.getAccount({
address: action.payload.signerAddress,
networkId: action.payload.networkId,
})
if (!account) {
throw Error("No selected account")
}

const result = await wallet.signUnsignedTx(account, action.payload)

return {
Expand Down

0 comments on commit 2d9992a

Please sign in to comment.