From 78469b852ec6d67c9d7891955c8dc13e99629019 Mon Sep 17 00:00:00 2001 From: Rafal Czajkowski Date: Wed, 9 Sep 2020 14:22:41 +0200 Subject: [PATCH] Disable a withdraw btn in bonding section Disable withdraw btn for copied delegations from liquid tokens. From `TokenStaking` contract's perspective, the `StakingPortBacker` is an owner of the copied delegation, so the "real" owner cannot withdraw bond. --- .../dashboard/src/services/tbtc-authorization.service.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/solidity/dashboard/src/services/tbtc-authorization.service.js b/solidity/dashboard/src/services/tbtc-authorization.service.js index a4997378eb..ec098262f0 100644 --- a/solidity/dashboard/src/services/tbtc-authorization.service.js +++ b/solidity/dashboard/src/services/tbtc-authorization.service.js @@ -280,7 +280,10 @@ const fetchOperatorsOf = async (web3Context, yourAddress) => { web3Utils.toChecksumAddress(copiedOperatorsFromLiquidTokens[i]), { managedGrantInfo: {}, - isWithdrawableForOperator: true, + // From the `TokenStaking` contract's perspective, + // the `StakingPortBacker` contract is an owner of the copied delegation, + // so the "real" owner cannot withdraw bond. + isWithdrawableForOperator: false, } ) }