Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit 4f86f74

Browse files
fix: unstake double ubbn conversion should be avoided (#1397)
1 parent 404686a commit 4f86f74

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/ui/baby/components/ActivityList/index.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@ export function BabyActivityList() {
7979
delegation.validator.commission,
8080
),
8181
},
82-
{
83-
label: "Shares",
84-
value: delegation.shares.toFixed(6),
85-
},
8682
{
8783
label: "Status",
8884
value: isUnbonding ? "Unbonding" : "Active",

src/ui/baby/hooks/services/useDelegationService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,10 @@ export function useDelegationService() {
311311
);
312312

313313
const unstake = useCallback(
314-
async ({ validatorAddress, amount }: StakingParams) => {
314+
async ({ validatorAddress, amount: amountInUbbn }: StakingParams) => {
315315
if (!bech32Address) throw Error("Babylon Wallet is not connected");
316316

317-
const unbondAmount = babylon.utils.babyToUbbn(Number(amount));
317+
const unbondAmount = BigInt(amountInUbbn);
318318

319319
const currentDelegation = delegations.find(
320320
(d) => d.delegation.validatorAddress === validatorAddress,

0 commit comments

Comments
 (0)