-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Create Account] Fund account with Friend button behavior (#827)
- Loading branch information
1 parent
f39007d
commit b7af0b1
Showing
10 changed files
with
296 additions
and
101 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Alert } from "@stellar/design-system"; | ||
|
||
export const ErrorMsg = ({ | ||
onClose, | ||
isVisible, | ||
errorMsg, | ||
}: { | ||
onClose: () => void | undefined; | ||
isVisible: boolean; | ||
errorMsg: string | undefined; | ||
}) => | ||
isVisible ? ( | ||
<Alert | ||
placement="inline" | ||
variant="error" | ||
onClose={onClose} | ||
title={errorMsg} | ||
> | ||
{""} | ||
</Alert> | ||
) : null; |
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,39 @@ | ||
import { Alert } from "@stellar/design-system"; | ||
|
||
import { useStore } from "@/store/useStore"; | ||
|
||
import { shortenStellarAddress } from "@/helpers/shortenStellarAddress"; | ||
|
||
export const SuccessMsg = ({ | ||
onClose, | ||
publicKey, | ||
isVisible, | ||
}: { | ||
onClose: () => void | undefined; | ||
publicKey: string; | ||
isVisible: boolean; | ||
}) => { | ||
const { network } = useStore(); | ||
const IS_STELLAR_EXPERT_ENABLED = | ||
network.id === "testnet" || network.id === "mainnet"; | ||
|
||
return isVisible ? ( | ||
<Alert | ||
placement="inline" | ||
variant="success" | ||
actionLabel={ | ||
IS_STELLAR_EXPERT_ENABLED ? "View on stellar.expert" : undefined | ||
} | ||
actionLink={ | ||
IS_STELLAR_EXPERT_ENABLED | ||
? `https://stellar.expert/explorer/${network.id}/account/${publicKey}` | ||
: undefined | ||
} | ||
onClose={onClose} | ||
title={`Successfully funded ${shortenStellarAddress(publicKey)} on | ||
${network.id}`} | ||
> | ||
{""} | ||
</Alert> | ||
) : null; | ||
}; |
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.