diff --git a/package-lock.json b/package-lock.json index d3de014..8263d3a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3078,13 +3078,12 @@ "integrity": "sha512-F1tGh056XczEaEAqu7s+hlZUDWwOBT70Eq0lfMpBP2YguSQVyxRbprLq5rELXKQOyOaixTWYhMeMQMzP0U5FoQ==" }, "algosdk": { - "version": "1.24.1", - "resolved": "https://registry.npmjs.org/algosdk/-/algosdk-1.24.1.tgz", - "integrity": "sha512-9moZxdqeJ6GdE4N6fA/GlUP4LrbLZMYcYkt141J4Ss68OfEgH9qW0wBuZ3ZOKEx/xjc5bg7mLP2Gjg7nwrkmww==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/algosdk/-/algosdk-2.7.0.tgz", + "integrity": "sha512-sBE9lpV7bup3rZ+q2j3JQaFAE9JwZvjWKX00vPlG8e9txctXbgLL56jZhSWZndqhDI9oI+0P4NldkuQIWdrUyg==", "requires": { "algo-msgpack-with-bigint": "^2.1.1", - "buffer": "^6.0.2", - "cross-fetch": "^3.1.5", + "buffer": "^6.0.3", "hi-base32": "^0.5.1", "js-sha256": "^0.9.0", "js-sha3": "^0.8.0", @@ -3771,9 +3770,9 @@ "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" }, "bignumber.js": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", - "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==" + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==" }, "binary-extensions": { "version": "2.2.0", @@ -4723,11 +4722,11 @@ } }, "cross-fetch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", - "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", "requires": { - "node-fetch": "2.6.7" + "node-fetch": "^2.6.12" } }, "cross-spawn": { @@ -10740,9 +10739,9 @@ } }, "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "requires": { "whatwg-url": "^5.0.0" }, @@ -10952,6 +10951,25 @@ "requires": { "algosdk": "^1.24.1", "hi-base32": "^0.5.1" + }, + "dependencies": { + "algosdk": { + "version": "1.24.1", + "resolved": "https://registry.npmjs.org/algosdk/-/algosdk-1.24.1.tgz", + "integrity": "sha512-9moZxdqeJ6GdE4N6fA/GlUP4LrbLZMYcYkt141J4Ss68OfEgH9qW0wBuZ3ZOKEx/xjc5bg7mLP2Gjg7nwrkmww==", + "requires": { + "algo-msgpack-with-bigint": "^2.1.1", + "buffer": "^6.0.2", + "cross-fetch": "^3.1.5", + "hi-base32": "^0.5.1", + "js-sha256": "^0.9.0", + "js-sha3": "^0.8.0", + "js-sha512": "^0.8.0", + "json-bigint": "^1.0.0", + "tweetnacl": "^1.0.3", + "vlq": "^2.0.4" + } + } } }, "npm-run-path": { diff --git a/package.json b/package.json index f7a1663..b10b7a5 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "@testing-library/react": "^12.1.4", "@testing-library/user-event": "^13.5.0", "@types/react-modal": "^3.13.1", - "algosdk": "^1.23.2", + "algosdk": "2.7.0", "notiboy-js-sdk": "^1.1.0", "react": "^18.0.0", "react-dom": "^18.0.0", diff --git a/src/core/home/sign-txn/create/button/CreateTxnButton.tsx b/src/core/home/sign-txn/create/button/CreateTxnButton.tsx index f921000..ce6b1a2 100644 --- a/src/core/home/sign-txn/create/button/CreateTxnButton.tsx +++ b/src/core/home/sign-txn/create/button/CreateTxnButton.tsx @@ -170,7 +170,6 @@ function CreateTxnButton({ } else { txn = algosdk.makeKeyRegistrationTxnWithSuggestedParamsFromObject({ from: address, - nonParticipation: true, rekeyTo: isValidAddress(rekeyTo) ? rekeyTo : undefined, suggestedParams }); diff --git a/src/core/home/sign-txn/util/signTxnUtils.tsx b/src/core/home/sign-txn/util/signTxnUtils.tsx index e8da9c7..6f2430f 100644 --- a/src/core/home/sign-txn/util/signTxnUtils.tsx +++ b/src/core/home/sign-txn/util/signTxnUtils.tsx @@ -1,7 +1,6 @@ /* eslint-disable */ import algosdk, {SuggestedParams} from "algosdk"; -import {apiGetTxnParams, ChainType, clientForChain} from "../../../utils/algod/algod"; -import Notiboy from "notiboy-js-sdk"; +import {apiGetTxnParams, ChainType} from "../../../utils/algod/algod"; const testAccounts = [ algosdk.mnemonicToSecretKey( @@ -2637,35 +2636,35 @@ const singleZoneTransferTxn: Scenario = async ( }; }; -const notiboyGlobalOptIn: Scenario = async ( - chain: ChainType, - address: string -): Promise => { - const indexer = new algosdk.Indexer("", "https://mainnet-idx.algonode.cloud", ""); - const notiboy = new Notiboy(clientForChain(chain), indexer); - const userGlobalOptin = await notiboy.userContractOptin(address); - const transactions: IScenarioTxn[][] = []; - userGlobalOptin.map((txn) => { - transactions.push([{txn}]); - }); - - return { - transaction: transactions - }; -}; - -const notiboyChannelOptIn: Scenario = async ( - chain: ChainType, - address: string -): Promise => { - const indexer = new algosdk.Indexer("", "https://mainnet-idx.algonode.cloud", ""); - const notiboy = new Notiboy(clientForChain(chain), indexer); - const channelOptinTxn = await notiboy.userChannelOptin(address, 1025363595); - - return { - transaction: [[{txn: channelOptinTxn}]] - }; -}; +// const notiboyGlobalOptIn: Scenario = async ( +// chain: ChainType, +// address: string +// ): Promise => { +// const indexer = new algosdk.Indexer("", "https://mainnet-idx.algonode.cloud", ""); +// const notiboy = new Notiboy(clientForChain(chain), indexer); +// const userGlobalOptin = await notiboy.userContractOptin(address); +// const transactions: IScenarioTxn[][] = []; +// userGlobalOptin.map((txn) => { +// transactions.push([{txn}]); +// }); + +// return { +// transaction: transactions +// }; +// }; + +// const notiboyChannelOptIn: Scenario = async ( +// chain: ChainType, +// address: string +// ): Promise => { +// const indexer = new algosdk.Indexer("", "https://mainnet-idx.algonode.cloud", ""); +// const notiboy = new Notiboy(clientForChain(chain), indexer); +// const channelOptinTxn = await notiboy.userChannelOptin(address, 1025363595); + +// return { +// transaction: [[{txn: channelOptinTxn}]] +// }; +// }; export const mainnetScenarios: Array<{name: string; scenario: Scenario}> = [ { @@ -2700,14 +2699,14 @@ export const mainnetScenarios: Array<{name: string; scenario: Scenario}> = [ name: "8. Zone Transfer", scenario: singleZoneTransferTxn }, - { - name: "9. Notiboy Global Optin", - scenario: notiboyGlobalOptIn - }, - { - name: "10. Notiboy Channel Optin", - scenario: notiboyChannelOptIn - } + // { + // name: "9. Notiboy Global Optin", + // scenario: notiboyGlobalOptIn + // }, + // { + // name: "10. Notiboy Channel Optin", + // scenario: notiboyChannelOptIn + // } ]; export const scenarios: Array<{name: string; scenario: Scenario}> = [