-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into chore/optimize-user-flow
Signed-off-by: Burnt Val <[email protected]>
- Loading branch information
Showing
12 changed files
with
296 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"abstraxion-dashboard": minor | ||
--- | ||
|
||
Added receive functionality to dashboard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"abstraxion-dashboard": patch | ||
"@burnt-labs/constants": patch | ||
--- | ||
|
||
Update casing of "XION" from across multiple components |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
apps/abstraxion-dashboard/components/WalletReceive/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import { ReactElement, useState } from "react"; | ||
import { Button, Dialog, DialogContent, DialogTrigger } from "@burnt-labs/ui"; | ||
import { DialogClose } from "@burnt-labs/ui"; | ||
import { CloseIcon } from "@burnt-labs/ui"; | ||
import { truncateAddress } from "@/utils"; | ||
import { CopyIcon } from "../Icons"; | ||
import { QRCodeSVG } from "qrcode.react"; | ||
|
||
export function WalletReceive({ | ||
trigger, | ||
xionAddress, | ||
}: { | ||
trigger: ReactElement; | ||
xionAddress: string; | ||
}) { | ||
const [isOpen, setIsOpen] = useState(false); | ||
|
||
const copyXionAddress = () => { | ||
if (xionAddress) { | ||
navigator.clipboard.writeText(xionAddress); | ||
} | ||
}; | ||
|
||
return ( | ||
<Dialog onOpenChange={setIsOpen} open={isOpen}> | ||
<DialogTrigger>{trigger}</DialogTrigger> | ||
<DialogContent | ||
className="ui-text-white" | ||
onPointerDownOutside={(e: any) => e.preventDefault()} | ||
> | ||
<DialogClose className="ui-absolute ui-top-5 ui-right-10"> | ||
<CloseIcon className="ui-stroke-white/50" /> | ||
</DialogClose> | ||
<div className="ui-flex ui-flex-col ui-pt-8"> | ||
<h1 className="ui-w-full ui-text-center ui-text-3xl ui-font-akkuratLL ui-font-thin"> | ||
RECEIVE | ||
</h1> | ||
<h3 className="ui-text-white ui-text-sm ui-font-bold ui-font-akkuratLL ui-leading-none ui-my-6"> | ||
XION Address | ||
</h3> | ||
<div | ||
onClick={copyXionAddress} | ||
className="ui-flex ui-cursor-pointer ui-items-center ui-justify-between ui-px-4 ui-w-full ui-h-16 ui-bg-black ui-rounded-lg" | ||
> | ||
<p className="ui-text-white ui-text-base ui-font-normal ui-font-akkuratLL ui-leading-normal"> | ||
{truncateAddress(xionAddress)} | ||
</p> | ||
<CopyIcon color="white" /> | ||
</div> | ||
<div className="ui-flex ui-items-center ui-justify-center ui-my-6 ui-p-6 ui-w-full ui-bg-black ui-rounded-lg"> | ||
<QRCodeSVG value={"uxion:" + xionAddress} /> | ||
</div> | ||
<Button onClick={() => setIsOpen(false)} fullWidth> | ||
Close | ||
</Button> | ||
</div> | ||
</DialogContent> | ||
</Dialog> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.