-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hotfix/tx sim #1930
Hotfix/tx sim #1930
Conversation
export const handleTransactionMessage: HandleMessage< | ||
TransactionMessage | ||
> = async ({ msg, background: { wallet, actionQueue }, respond: respond }) => { | ||
switch (msg.type) { | ||
case "EXECUTE_TRANSACTION": { | ||
const { meta } = await actionQueue.push({ | ||
type: "TRANSACTION", | ||
payload: msg.data, | ||
}) | ||
return respond({ | ||
type: "EXECUTE_TRANSACTION_RES", | ||
data: { actionHash: meta.hash }, | ||
}) | ||
} | ||
|
||
case "ESTIMATE_TRANSACTION_FEE": { | ||
const selectedAccount = await wallet.getSelectedAccount() | ||
const starknetAccount = await wallet.getSelectedStarknetAccount() | ||
const transactions = msg.data | ||
|
||
if (!selectedAccount) { | ||
throw Error("no accounts") | ||
export const handleTransactionMessage: HandleMessage<TransactionMessage> = | ||
async ({ msg, background: { wallet, actionQueue }, respond: respond }) => { | ||
switch (msg.type) { | ||
case "EXECUTE_TRANSACTION": { | ||
const { meta } = await actionQueue.push({ | ||
type: "TRANSACTION", | ||
payload: msg.data, | ||
}) | ||
return respond({ | ||
type: "EXECUTE_TRANSACTION_RES", | ||
data: { actionHash: meta.hash }, | ||
}) | ||
} | ||
try { | ||
let txFee = "0", | ||
maxTxFee = "0", | ||
accountDeploymentFee: string | undefined, | ||
maxADFee: string | undefined | ||
|
||
if ( | ||
selectedAccount.needsDeploy && | ||
!(await isAccountDeployed( | ||
selectedAccount, | ||
starknetAccount.getClassAt, | ||
)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why but the linter is auto-formatting code on commit. There hasn't been so many changes
signature, | ||
nonce, | ||
version, | ||
const nonce = await starknetAccount.getNonce() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main change in this file
Kudos, SonarCloud Quality Gate passed! |
Issue / feature description
Add New Transaction Simulation Spinner and fix nonce issue
Checklist