Skip to content

Commit 3cf7fe4

Browse files
authored
Merge branch 'main' into yash/ocr-contracts-integration
2 parents 2aa90b7 + 6f581c8 commit 3cf7fe4

File tree

4 files changed

+26
-44
lines changed

4 files changed

+26
-44
lines changed

apps/dashboard/src/@/components/tx-button/MismatchButton.tsx

Lines changed: 24 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
} from "thirdweb";
1919
import { type Chain, type ChainMetadata, localhost } from "thirdweb/chains";
2020
import {
21-
PayEmbed,
21+
BuyWidget,
2222
useActiveAccount,
2323
useActiveWallet,
2424
useActiveWalletChain,
@@ -29,7 +29,6 @@ import {
2929
import { privateKeyToAccount, type Wallet } from "thirdweb/wallets";
3030
import { apiServerProxy } from "@/actions/proxies";
3131
import { Button } from "@/components/ui/button";
32-
import { DynamicHeight } from "@/components/ui/DynamicHeight";
3332
import {
3433
Dialog,
3534
DialogContent,
@@ -251,39 +250,32 @@ export const MismatchButton = forwardRef<
251250
>
252251
<DialogContent
253252
className={cn(
254-
"gap-0 p-0",
255-
dialog === "no-funds" && "md:!max-w-[480px]",
256-
dialog === "pay" && "md:!max-w-[360px] border-none bg-transparent",
253+
"gap-0 p-0 md:!max-w-[480px]",
254+
dialog === "pay" && "border-none bg-transparent",
257255
)}
258256
dialogCloseClassName="focus:ring-0"
259257
>
260-
<DynamicHeight>
261-
{dialog === "no-funds" && (
262-
<NoFundsDialogContent
263-
chain={txChain}
264-
client={props.client}
265-
isLoggedIn={props.isLoggedIn}
266-
onCloseModal={() => setDialog(undefined)}
267-
openPayModal={() => {
268-
setDialog("pay");
269-
}}
270-
/>
271-
)}
258+
{dialog === "no-funds" && (
259+
<NoFundsDialogContent
260+
chain={txChain}
261+
client={props.client}
262+
isLoggedIn={props.isLoggedIn}
263+
onCloseModal={() => setDialog(undefined)}
264+
openPayModal={() => {
265+
setDialog("pay");
266+
}}
267+
/>
268+
)}
272269

273-
{dialog === "pay" && (
274-
<PayEmbed
275-
className="!w-auto"
276-
client={props.client}
277-
payOptions={{
278-
prefillBuy: {
279-
amount: "0.01",
280-
chain: txChain,
281-
},
282-
}}
283-
theme={getSDKTheme(theme === "dark" ? "dark" : "light")}
284-
/>
285-
)}
286-
</DynamicHeight>
270+
{dialog === "pay" && (
271+
<BuyWidget
272+
className="!w-full"
273+
client={props.client}
274+
chain={txChain}
275+
amount="0.01"
276+
theme={getSDKTheme(theme === "dark" ? "dark" : "light")}
277+
/>
278+
)}
287279
</DialogContent>
288280
</Dialog>
289281
</>
@@ -362,11 +354,7 @@ function NoFundsDialogContent(props: {
362354
(x) => x.enabled && x.service === "pay",
363355
) ? (
364356
// pay case
365-
<Button
366-
className="w-full"
367-
onClick={props.openPayModal}
368-
variant="primary"
369-
>
357+
<Button className="w-full" onClick={props.openPayModal}>
370358
Buy Funds
371359
</Button>
372360
) : // no funds options available

apps/dashboard/src/@/components/ui/DynamicHeight.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function DynamicHeight(props: {
1717
boxSizing: "border-box",
1818
height: height ? `${height}px` : "auto",
1919
overflow: "hidden",
20-
transition: props.transition || "height 250ms ease",
20+
transition: props.transition || "height 220ms ease",
2121
}}
2222
>
2323
<div

apps/dashboard/src/@/constants/addresses.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
export const THIRDWEB_DEPLOYER_ADDRESS =
22
"0xdd99b75f095d0c4d5112aCe938e4e6ed962fb024";
33

4-
export const THIRDWEB_PUBLISHER_ADDRESS =
5-
"0xdd99b75f095d0c4d5112aCe938e4e6ed962fb024";
6-
74
export const DEFAULT_FEE_RECIPIENT =
85
"0x1af20c6b23373350ad464700b5965ce4b0d2ad94";
96

apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/custom-contract.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ import {
4747
DEFAULT_FEE_BPS,
4848
DEFAULT_FEE_BPS_NEW,
4949
DEFAULT_FEE_RECIPIENT,
50-
THIRDWEB_PUBLISHER_ADDRESS,
5150
} from "@/constants/addresses";
5251
import { LAST_USED_PROJECT_ID, LAST_USED_TEAM_ID } from "@/constants/cookie";
5352
import { ZERO_FEE_CHAINS } from "@/constants/fee-config";
@@ -218,9 +217,7 @@ export const CustomContractForm: React.FC<CustomContractFormProps> = ({
218217
const defaultFeeRecipientFunction = metadata.abi.find(
219218
(a) => a.type === "function" && a.name === "DEFAULT_FEE_RECIPIENT",
220219
);
221-
const hasInbuiltDefaultFeeConfig =
222-
defaultFeeRecipientFunction &&
223-
metadata.publisher === THIRDWEB_PUBLISHER_ADDRESS;
220+
const hasInbuiltDefaultFeeConfig = defaultFeeRecipientFunction;
224221

225222
const isFeeExempt =
226223
walletChain?.id && ZERO_FEE_CHAINS.includes(walletChain.id);

0 commit comments

Comments
 (0)