diff --git a/contracts/bootstrap/package.json b/contracts/bootstrap/package.json index 396cb7f1..653e6700 100644 --- a/contracts/bootstrap/package.json +++ b/contracts/bootstrap/package.json @@ -1,6 +1,6 @@ { "name": "bootstrap", - "version": "0.8.8", + "version": "0.8.9", "description": "", "main": "index.ts", "scripts": { diff --git a/contracts/package.json b/contracts/package.json index 73babcc3..cedb83cd 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -1,6 +1,6 @@ { "name": "reti-contracts", - "version": "0.8.8", + "version": "0.8.9", "license": "MIT", "scripts": { "generate-client": "algokit generate client contracts/artifacts/ --language typescript --output contracts/clients/{contract_name}Client.ts && ./update_contract_artifacts.sh``", diff --git a/ui/package.json b/ui/package.json index 0460fda3..ad37ea34 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,6 @@ { "name": "reti-ui", - "version": "0.8.8", + "version": "0.8.9", "private": true, "type": "module", "engines": { diff --git a/ui/src/utils/development.tsx b/ui/src/utils/development.tsx index e07bf3c3..0d8a7c46 100644 --- a/ui/src/utils/development.tsx +++ b/ui/src/utils/development.tsx @@ -22,12 +22,6 @@ const algodClient = algokit.getAlgoClient({ token: algodConfig.token, }) -const kmdClient = algokit.getAlgoKmdClient({ - server: algodConfig.server, - port: algodConfig.port, - token: algodConfig.token, -}) - async function wait(ms: number) { return new Promise((resolve) => { setTimeout(resolve, ms) @@ -35,6 +29,10 @@ async function wait(ms: number) { } export async function incrementRoundNumberBy(rounds: number) { + if (process.env.NODE_ENV !== 'development') { + throw new Error('Increment round number is only available in development mode') + } + const startParams = await algodClient.getTransactionParams().do() let result = { @@ -49,6 +47,12 @@ export async function incrementRoundNumberBy(rounds: number) { // console.log(`Increment round number start: ${result.startRound}`) + const kmdClient = algokit.getAlgoKmdClient({ + server: algodConfig.server, + port: algodConfig.port, + token: algodConfig.token, + }) + const testAccount = await getTestAccount( { initialFunds: AlgoAmount.Algos(10), suppressLog: true }, algodClient, @@ -89,6 +93,10 @@ export async function triggerPoolPayouts( activeAddress: string, authAddr: string | undefined, ) { + if (process.env.NODE_ENV !== 'development') { + throw new Error('Triggering pool payouts is only available in development mode') + } + function createNextItemPromise(): [Promise, () => void] { let resolveNextItem: () => void const nextItemPromise = new Promise((resolve) => { @@ -149,6 +157,10 @@ export async function simulateEpoch( const toastId = 'simulate-epoch' try { + if (process.env.NODE_ENV !== 'development') { + throw new Error('Simulate epoch is only available in development mode') + } + if (!activeAddress) { throw new Error('No active wallet found') }