-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #405 from hyperlane-xyz/main-to-trump
Main to trump
- Loading branch information
Showing
15 changed files
with
2,057 additions
and
939 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,5 @@ | ||
export enum WARP_QUERY_PARAMS { | ||
ORIGIN = 'origin', | ||
DESTINATION = 'destination', | ||
TOKEN = 'token', | ||
} |
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,10 @@ | ||
import { warpRouteConfigs } from '@hyperlane-xyz/registry'; | ||
import { assert, test } from 'vitest'; | ||
import { warpRouteWhitelist } from './warpRouteWhitelist'; | ||
|
||
test('warpRouteWhitelist', () => { | ||
if (!warpRouteWhitelist) return; | ||
for (const id of warpRouteWhitelist) { | ||
assert(warpRouteConfigs[id], `No route with id ${id} found in registry.`); | ||
} | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { Modal } from '@hyperlane-xyz/widgets'; | ||
import { useFormikContext } from 'formik'; | ||
import { SolidButton } from '../../components/buttons/SolidButton'; | ||
import { TransferFormValues } from './types'; | ||
|
||
export function RecipientConfirmationModal({ | ||
isOpen, | ||
close, | ||
onConfirm, | ||
}: { | ||
isOpen: boolean; | ||
close: () => void; | ||
onConfirm: () => void; | ||
}) { | ||
const { values } = useFormikContext<TransferFormValues>(); | ||
return ( | ||
<Modal | ||
isOpen={isOpen} | ||
close={close} | ||
title="Confirm Recipient Address" | ||
panelClassname="flex flex-col items-center p-4 gap-5" | ||
> | ||
<p className="text-center text-sm"> | ||
The recipient address has no funds on the destination chain. Is this address correct? | ||
</p> | ||
<p className="rounded-lg bg-primary-500/5 p-2 text-center text-sm">{values.recipient}</p> | ||
<div className="flex items-center justify-center gap-12"> | ||
<SolidButton onClick={close} color="gray" className="min-w-24 px-4 py-1"> | ||
Cancel | ||
</SolidButton> | ||
<SolidButton | ||
onClick={() => { | ||
close(); | ||
onConfirm(); | ||
}} | ||
color="primary" | ||
className="min-w-24 px-4 py-1" | ||
> | ||
Continue | ||
</SolidButton> | ||
</div> | ||
</Modal> | ||
); | ||
} |
Oops, something went wrong.