Skip to content

Commit

Permalink
Merge pull request #163 from TxnLab/dev
Browse files Browse the repository at this point in the history
v0.8.9
  • Loading branch information
drichar authored May 21, 2024
2 parents aeadd26 + 020cd03 commit eeaa644
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion contracts/bootstrap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bootstrap",
"version": "0.8.8",
"version": "0.8.9",
"description": "",
"main": "index.ts",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
@@ -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``",
Expand Down
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reti-ui",
"version": "0.8.8",
"version": "0.8.9",
"private": true,
"type": "module",
"engines": {
Expand Down
24 changes: 18 additions & 6 deletions ui/src/utils/development.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,17 @@ 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)
})
}

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 = {
Expand All @@ -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,
Expand Down Expand Up @@ -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>, () => void] {
let resolveNextItem: () => void
const nextItemPromise = new Promise<void>((resolve) => {
Expand Down Expand Up @@ -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')
}
Expand Down

0 comments on commit eeaa644

Please sign in to comment.