From 7da0c4f4b3413c398dda1d4e5e598c3e1c1ec11d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Leszczyk?= Date: Fri, 15 Nov 2024 10:55:30 +0100 Subject: [PATCH] fix: properly add approval screen for SetL1ValidatorWeight --- src/pages/ApproveAction/AvalancheSignTx.tsx | 3 +++ .../ApproveAction/components/ApproveSetL1ValidatorWeight.tsx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pages/ApproveAction/AvalancheSignTx.tsx b/src/pages/ApproveAction/AvalancheSignTx.tsx index eea766f1..e561d975 100644 --- a/src/pages/ApproveAction/AvalancheSignTx.tsx +++ b/src/pages/ApproveAction/AvalancheSignTx.tsx @@ -41,6 +41,7 @@ import { ApproveConvertSubnetToL1 } from './components/ApproveConvertSubnetToL1' import { ApproveRegisterL1Validator } from './components/ApproveRegisterL1Validator'; import { ApproveIncreaseL1ValidatorBalance } from './components/ApproveIncreaseL1ValidatorBalance'; import { ApproveDisableL1Validator } from './components/ApproveDisableL1Validator'; +import { ApproveSetL1ValidatorWeight } from './components/ApproveSetL1ValidatorWeight'; export function AvalancheSignTx() { const requestId = useGetRequestId(); @@ -146,6 +147,8 @@ export function AvalancheSignTx() { return ; } else if (Avalanche.isDisableL1ValidatorTx(tx)) { return ; + } else if (Avalanche.isSetL1ValidatorWeightTx(tx)) { + return ; } else if (Avalanche.isIncreaseL1ValidatorBalance(tx)) { return ( diff --git a/src/pages/ApproveAction/components/ApproveSetL1ValidatorWeight.tsx b/src/pages/ApproveAction/components/ApproveSetL1ValidatorWeight.tsx index 0e2afeb8..2e6d8200 100644 --- a/src/pages/ApproveAction/components/ApproveSetL1ValidatorWeight.tsx +++ b/src/pages/ApproveAction/components/ApproveSetL1ValidatorWeight.tsx @@ -10,7 +10,7 @@ import { TxDetailsRow } from '@src/components/common/approval/TxDetailsRow'; import { AvaxAmount } from './AvaxAmount'; import { Avalanche } from '@avalabs/core-wallets-sdk'; -export function ApproveRegisterL1Validator({ +export function ApproveSetL1ValidatorWeight({ tx, avaxPrice, }: {