Skip to content

Commit 51f1a4c

Browse files
marc2332msarcev
andauthored
chore(dapp): Remove isConnected guard check in PurchaseName dialog (#1157)
Co-authored-by: msarcev <mario.sarcevic@iota.org>
1 parent d16a60a commit 51f1a4c

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

dapp/src/components/dialogs/PurchaseNameDialog.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ export function PurchaseNameDialog({ name, open, setOpen, onCompleted }: Purchas
9595
});
9696

9797
const price = nameRecordData?.type === 'available' ? nameRecordData?.price : 0;
98-
const isConnected = !!account?.address;
9998

10099
const updates: NameUpdate[] = [];
101100

@@ -247,8 +246,6 @@ export function PurchaseNameDialog({ name, open, setOpen, onCompleted }: Purchas
247246
setPurchaseYears(Number(years));
248247
}
249248

250-
if (!isConnected) return null;
251-
252249
const usingPrice = applyDiscount ? discountedPrice : price;
253250
const finalPrice = new BigNumber(usingPrice ?? 0)
254251
.plus(updateNameData?.gasSummary?.totalGas ?? 0)
@@ -260,7 +257,6 @@ export function PurchaseNameDialog({ name, open, setOpen, onCompleted }: Purchas
260257
const fiatPriceResult = useCalculatePriceInFiat(finalPrice);
261258

262259
const canPay =
263-
isConnected &&
264260
!nameRecordError &&
265261
Number(coinBalance?.totalBalance) > finalPrice &&
266262
nameRecordData?.type === 'available';

0 commit comments

Comments
 (0)