-
Notifications
You must be signed in to change notification settings - Fork 1
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 jean/cow-412-placeholder-cow-amm-deposit-hoo…
…k-review
- Loading branch information
1 parent
43b0976
commit 41e24ef
Showing
62 changed files
with
810 additions
and
476 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
pnpm biome check | ||
pnpm biome check . |
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,61 @@ | ||
import { | ||
ButtonPrimary, | ||
type HookDappContextAdjusted, | ||
} from "@bleu/cow-hooks-ui"; | ||
import { ExclamationTriangleIcon } from "@radix-ui/react-icons"; | ||
|
||
export const Button = ({ | ||
context, | ||
isOutOfFunds, | ||
isBuildingHook, | ||
disabled, | ||
}: { | ||
context: HookDappContextAdjusted; | ||
isOutOfFunds: boolean; | ||
isBuildingHook: boolean; | ||
disabled: boolean; | ||
}) => { | ||
return ( | ||
<ButtonPrimary type="submit" disabled={disabled}> | ||
<ButtonText | ||
context={context} | ||
isOutOfFunds={isOutOfFunds} | ||
isBuildingHook={isBuildingHook} | ||
/> | ||
</ButtonPrimary> | ||
); | ||
}; | ||
|
||
const ButtonText = ({ | ||
context, | ||
isOutOfFunds, | ||
isBuildingHook, | ||
}: { | ||
context: HookDappContextAdjusted; | ||
isOutOfFunds: boolean; | ||
isBuildingHook: boolean; | ||
}) => { | ||
if (isOutOfFunds) | ||
return ( | ||
<span className="flex items-center justify-center gap-2"> | ||
<ExclamationTriangleIcon className="w-6 h-6" /> | ||
You won't have enough funds | ||
</span> | ||
); | ||
|
||
if (isBuildingHook) | ||
return ( | ||
<span className="flex items-center justify-center gap-2"> | ||
Building post-hook... | ||
</span> | ||
); | ||
|
||
if (context?.hookToEdit && context?.isPreHook) | ||
return <span>Update pre-hook</span>; | ||
if (context?.hookToEdit && !context?.isPreHook) | ||
return <span>Update post-hook</span>; | ||
if (!context?.hookToEdit && context?.isPreHook) | ||
return <span>Add pre-hook</span>; | ||
if (!context?.hookToEdit && !context?.isPreHook) | ||
return <span>Add post-hook</span>; | ||
}; |
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,19 @@ | ||
import { ArrowTopRightIcon } from "@radix-ui/react-icons"; | ||
|
||
export const InfoContent = () => { | ||
return ( | ||
<span className="cursor-default"> | ||
To access Vesting Post-hook contract after swap, connect with the | ||
recipient wallet at{" "} | ||
<a | ||
href="https://llamapay.io/vesting" | ||
target="_blank" | ||
rel="noreferrer" | ||
className="text-color-link underline" | ||
> | ||
llamapay.io/vesting | ||
<ArrowTopRightIcon className="size-4 shrink-0 inline" /> | ||
</a> | ||
</span> | ||
); | ||
}; |
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.