Skip to content

Commit e1cccd7

Browse files
authored
Feature: Displays the buy widget error message (#8108)
1 parent 3646964 commit e1cccd7

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

.changeset/wicked-cycles-attack.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Displays the failure error messages on the BuyWidget

packages/thirdweb/src/react/web/ui/Bridge/StepRunner.tsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,20 @@ export function StepRunner({
376376
</Container>
377377

378378
<Spacer y="md" />
379-
<Text center color="secondaryText" size="xs" multiline>
380-
Keep this window open until all
381-
<br /> transactions are complete.
379+
<Text
380+
center
381+
color={error ? "danger" : "secondaryText"}
382+
size="xs"
383+
multiline
384+
>
385+
{error ? (
386+
error.message || "An error occurred. Please try again."
387+
) : (
388+
<>
389+
Keep this window open until all
390+
<br /> transactions are complete.
391+
</>
392+
)}
382393
</Text>
383394

384395
<Spacer y="lg" />

0 commit comments

Comments
 (0)