From 042fbdca2a04a0b208fa885fd77c5980b36f79d4 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Mon, 29 Jan 2024 20:05:20 +0000 Subject: [PATCH] Fix rewards claim --- frontend/src/components/RobotInfo/index.tsx | 5 ++++- frontend/src/models/Coordinator.model.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/RobotInfo/index.tsx b/frontend/src/components/RobotInfo/index.tsx index 8d2d2f9e..0b22e77f 100644 --- a/frontend/src/components/RobotInfo/index.tsx +++ b/frontend/src/components/RobotInfo/index.tsx @@ -92,11 +92,13 @@ const RobotInfo: React.FC = ({ coordinator, onClose }: Props) => { if (robot != null && slot?.token != null && robot.encPrivKey != null) { void signCleartextMessage(rewardInvoice, robot.encPrivKey, slot?.token).then( (signedInvoice) => { + console.log('Signed message:', signedInvoice); void coordinator.fetchReward(signedInvoice, garage, slot?.token).then((data) => { + console.log(data); setBadInvoice(data.bad_invoice ?? ''); setShowRewardsSpinner(false); setWithdrawn(data.successful_withdrawal); - setOpenClaimRewards(!(data.successful_withdrawal !== undefined)); + setOpenClaimRewards(!data.successful_withdrawal); }); }, ); @@ -307,6 +309,7 @@ const RobotInfo: React.FC = ({ coordinator, onClose }: Props) => {