Skip to content

Commit

Permalink
Merge pull request #204 from TxnLab/dev
Browse files Browse the repository at this point in the history
v0.9.2
  • Loading branch information
drichar authored May 31, 2024
2 parents 57f9485 + feb1e51 commit d7612b0
Show file tree
Hide file tree
Showing 27 changed files with 945 additions and 461 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.9.1",
"version": "0.9.2",
"description": "",
"main": "index.ts",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reti-contracts",
"version": "0.9.1",
"version": "0.9.2",
"license": "MIT",
"scripts": {
"generate-client": "algokit generate client contracts/artifacts/ --language typescript --output contracts/clients/{contract_name}Client.ts && ./update_contract_artifacts.sh``",
Expand All @@ -24,8 +24,8 @@
"@algorandfoundation/tealscript": "=0.92.0",
"@jest/globals": "^29.7.0",
"@joe-p/algokit-generate-component": "^0.2.1",
"@typescript-eslint/eslint-plugin": "7.10.0",
"@typescript-eslint/parser": "7.10.0",
"@typescript-eslint/eslint-plugin": "7.11.0",
"@typescript-eslint/parser": "7.11.0",
"eslint": "8.57.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^18.0.0",
Expand Down
100 changes: 50 additions & 50 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.9.1",
"version": "0.9.2",
"private": true,
"type": "module",
"engines": {
Expand Down
15 changes: 15 additions & 0 deletions ui/src/api/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ import {
} from '@/api/clients'
import { fetchNfd } from '@/api/nfd'
import { ALGORAND_ZERO_ADDRESS_STRING } from '@/constants/accounts'
import { GatingType } from '@/constants/gating'
import { StakingPoolClient } from '@/contracts/StakingPoolClient'
import { ValidatorRegistryClient } from '@/contracts/ValidatorRegistryClient'
import { Asset } from '@/interfaces/algod'
import { StakedInfo, StakerPoolData, StakerValidatorData } from '@/interfaces/staking'
import {
Constraints,
Expand Down Expand Up @@ -123,6 +125,19 @@ export async function fetchValidator(
validator.rewardToken = rewardToken
}

if (validator.config.entryGatingType === GatingType.AssetId) {
const gatingAssets = await Promise.all(
validator.config.entryGatingAssets.map(async (assetId) => {
if (assetId > 0) {
return fetchAsset(assetId)
}
return null
}),
)

validator.gatingAssets = gatingAssets.filter(Boolean) as Asset[]
}

if (validator.config.nfdForInfo > 0) {
const nfd = await fetchNfd(validator.config.nfdForInfo, { view: 'full' })
validator.nfd = nfd
Expand Down
Loading

0 comments on commit d7612b0

Please sign in to comment.