diff --git a/src/core/home/sign-txn/util/signTxnUtils.tsx b/src/core/home/sign-txn/util/signTxnUtils.tsx index b2031b3..e8da9c7 100644 --- a/src/core/home/sign-txn/util/signTxnUtils.tsx +++ b/src/core/home/sign-txn/util/signTxnUtils.tsx @@ -350,6 +350,29 @@ const singleAppOptIn: Scenario = async ( }; }; +const singleAppOptInWithAppRekey: Scenario = async ( + chain: ChainType +): Promise => { + const suggestedParams = await apiGetTxnParams(chain); + + const appIndex = getAppIndex(chain); + + const txn = algosdk.makeApplicationOptInTxnFromObject({ + from: testAccounts[1].addr, + appIndex, + note: new Uint8Array(Buffer.from("example note value")), + appArgs: [Uint8Array.from([0]), Uint8Array.from([0, 1])], + rekeyTo: testAccounts[2].addr, + suggestedParams + }); + + const txnsToSign = [{txn}]; + + return { + transaction: [txnsToSign] + }; +}; + const singleAppCall: Scenario = async ( chain: ChainType, address: string @@ -2927,6 +2950,10 @@ export const scenarios: Array<{name: string; scenario: Scenario}> = [ { name: "60. 512 Transactions", scenario: fiveHundredTxns + }, + { + name: "61. Sign single app opt-in with rekey", + scenario: singleAppOptInWithAppRekey } ];