thirdweb 5.105.27 → 5.105.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/react/web/ui/Bridge/BridgeOrchestrator.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/BuyWidget.js +3 -0
- package/dist/cjs/react/web/ui/Bridge/BuyWidget.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/CheckoutWidget.js +1 -0
- package/dist/cjs/react/web/ui/Bridge/CheckoutWidget.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/DirectPayment.js +1 -1
- package/dist/cjs/react/web/ui/Bridge/DirectPayment.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/FundWallet.js +5 -3
- package/dist/cjs/react/web/ui/Bridge/FundWallet.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/TransactionPayment.js +1 -1
- package/dist/cjs/react/web/ui/Bridge/TransactionPayment.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/TransactionWidget.js +1 -0
- package/dist/cjs/react/web/ui/Bridge/TransactionWidget.js.map +1 -1
- package/dist/cjs/stories/Bridge/DirectPayment.stories.js +29 -1
- package/dist/cjs/stories/Bridge/DirectPayment.stories.js.map +1 -1
- package/dist/cjs/stories/Bridge/FundWallet.stories.js +29 -1
- package/dist/cjs/stories/Bridge/FundWallet.stories.js.map +1 -1
- package/dist/cjs/stories/Bridge/TransactionPayment.stories.js +29 -1
- package/dist/cjs/stories/Bridge/TransactionPayment.stories.js.map +1 -1
- package/dist/cjs/stories/Bridge/fixtures.js +34 -0
- package/dist/cjs/stories/Bridge/fixtures.js.map +1 -1
- package/dist/cjs/utils/any-evm/zksync/constants.js +3 -1
- package/dist/cjs/utils/any-evm/zksync/constants.js.map +1 -1
- package/dist/cjs/utils/process.js +3 -2
- package/dist/cjs/utils/process.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/react/web/ui/Bridge/BridgeOrchestrator.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/BuyWidget.js +3 -0
- package/dist/esm/react/web/ui/Bridge/BuyWidget.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/CheckoutWidget.js +1 -0
- package/dist/esm/react/web/ui/Bridge/CheckoutWidget.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/DirectPayment.js +1 -1
- package/dist/esm/react/web/ui/Bridge/DirectPayment.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/FundWallet.js +5 -3
- package/dist/esm/react/web/ui/Bridge/FundWallet.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/TransactionPayment.js +1 -1
- package/dist/esm/react/web/ui/Bridge/TransactionPayment.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/TransactionWidget.js +1 -0
- package/dist/esm/react/web/ui/Bridge/TransactionWidget.js.map +1 -1
- package/dist/esm/stories/Bridge/DirectPayment.stories.js +28 -0
- package/dist/esm/stories/Bridge/DirectPayment.stories.js.map +1 -1
- package/dist/esm/stories/Bridge/FundWallet.stories.js +28 -0
- package/dist/esm/stories/Bridge/FundWallet.stories.js.map +1 -1
- package/dist/esm/stories/Bridge/TransactionPayment.stories.js +28 -0
- package/dist/esm/stories/Bridge/TransactionPayment.stories.js.map +1 -1
- package/dist/esm/stories/Bridge/fixtures.js +34 -0
- package/dist/esm/stories/Bridge/fixtures.js.map +1 -1
- package/dist/esm/utils/any-evm/zksync/constants.js +3 -1
- package/dist/esm/utils/any-evm/zksync/constants.js.map +1 -1
- package/dist/esm/utils/process.js +3 -2
- package/dist/esm/utils/process.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/react/web/ui/Bridge/BridgeOrchestrator.d.ts +1 -0
- package/dist/types/react/web/ui/Bridge/BridgeOrchestrator.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/BuyWidget.d.ts +4 -0
- package/dist/types/react/web/ui/Bridge/BuyWidget.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/CheckoutWidget.d.ts +4 -0
- package/dist/types/react/web/ui/Bridge/CheckoutWidget.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/DirectPayment.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/FundWallet.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/TransactionWidget.d.ts +4 -0
- package/dist/types/react/web/ui/Bridge/TransactionWidget.d.ts.map +1 -1
- package/dist/types/stories/Bridge/BridgeOrchestrator.stories.d.ts +1 -0
- package/dist/types/stories/Bridge/BridgeOrchestrator.stories.d.ts.map +1 -1
- package/dist/types/stories/Bridge/DirectPayment.stories.d.ts +3 -0
- package/dist/types/stories/Bridge/DirectPayment.stories.d.ts.map +1 -1
- package/dist/types/stories/Bridge/FundWallet.stories.d.ts +3 -0
- package/dist/types/stories/Bridge/FundWallet.stories.d.ts.map +1 -1
- package/dist/types/stories/Bridge/SuccessScreen.stories.d.ts +1 -0
- package/dist/types/stories/Bridge/SuccessScreen.stories.d.ts.map +1 -1
- package/dist/types/stories/Bridge/TransactionPayment.stories.d.ts +3 -0
- package/dist/types/stories/Bridge/TransactionPayment.stories.d.ts.map +1 -1
- package/dist/types/stories/Bridge/fixtures.d.ts +3 -3
- package/dist/types/stories/Bridge/fixtures.d.ts.map +1 -1
- package/dist/types/utils/any-evm/zksync/constants.d.ts.map +1 -1
- package/dist/types/utils/process.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -3
- package/src/react/web/ui/Bridge/BridgeOrchestrator.tsx +1 -0
- package/src/react/web/ui/Bridge/BuyWidget.tsx +8 -0
- package/src/react/web/ui/Bridge/CheckoutWidget.tsx +6 -0
- package/src/react/web/ui/Bridge/DirectPayment.tsx +5 -1
- package/src/react/web/ui/Bridge/FundWallet.tsx +5 -2
- package/src/react/web/ui/Bridge/TransactionPayment.tsx +1 -1
- package/src/react/web/ui/Bridge/TransactionWidget.tsx +6 -0
- package/src/stories/Bridge/DirectPayment.stories.tsx +31 -0
- package/src/stories/Bridge/FundWallet.stories.tsx +31 -0
- package/src/stories/Bridge/TransactionPayment.stories.tsx +31 -0
- package/src/stories/Bridge/fixtures.ts +42 -3
- package/src/utils/any-evm/zksync/constants.ts +3 -1
- package/src/utils/process.ts +3 -2
- package/src/version.ts +1 -1
|
@@ -168,3 +168,34 @@ export const ContractInteractionLight: Story = {
|
|
|
168
168
|
},
|
|
169
169
|
},
|
|
170
170
|
};
|
|
171
|
+
|
|
172
|
+
export const CustomButtonLabel: Story = {
|
|
173
|
+
args: {
|
|
174
|
+
theme: "dark",
|
|
175
|
+
uiOptions: TRANSACTION_UI_OPTIONS.customButton,
|
|
176
|
+
},
|
|
177
|
+
parameters: {
|
|
178
|
+
backgrounds: { default: "dark" },
|
|
179
|
+
docs: {
|
|
180
|
+
description: {
|
|
181
|
+
story:
|
|
182
|
+
"Example showcasing custom button label functionality. The button shows 'Execute Now' instead of the default 'Execute [functionName]' text.",
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
export const CustomButtonLabelLight: Story = {
|
|
189
|
+
args: {
|
|
190
|
+
theme: "light",
|
|
191
|
+
uiOptions: TRANSACTION_UI_OPTIONS.customButton,
|
|
192
|
+
},
|
|
193
|
+
parameters: {
|
|
194
|
+
backgrounds: { default: "light" },
|
|
195
|
+
docs: {
|
|
196
|
+
description: {
|
|
197
|
+
story: "Light theme version with custom button label 'Execute Now'.",
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
};
|
|
@@ -684,7 +684,7 @@ type TransactionUIOptions = Extract<UIOptions, { mode: "transaction" }>;
|
|
|
684
684
|
|
|
685
685
|
// UI Options for FundWallet mode
|
|
686
686
|
export const FUND_WALLET_UI_OPTIONS: Record<
|
|
687
|
-
"ethDefault" | "ethWithAmount" | "usdcDefault" | "uniLarge",
|
|
687
|
+
"ethDefault" | "ethWithAmount" | "usdcDefault" | "uniLarge" | "customButton",
|
|
688
688
|
FundWalletUIOptions
|
|
689
689
|
> = {
|
|
690
690
|
ethDefault: {
|
|
@@ -718,11 +718,26 @@ export const FUND_WALLET_UI_OPTIONS: Record<
|
|
|
718
718
|
initialAmount: "5",
|
|
719
719
|
mode: "fund_wallet" as const,
|
|
720
720
|
},
|
|
721
|
+
customButton: {
|
|
722
|
+
destinationToken: ETH,
|
|
723
|
+
initialAmount: "0.01",
|
|
724
|
+
metadata: {
|
|
725
|
+
description: "Test custom button label for funding",
|
|
726
|
+
title: "Custom Fund Wallet",
|
|
727
|
+
},
|
|
728
|
+
mode: "fund_wallet" as const,
|
|
729
|
+
buttonLabel: "Add Funds Now",
|
|
730
|
+
},
|
|
721
731
|
};
|
|
722
732
|
|
|
723
733
|
// UI Options for DirectPayment mode
|
|
724
734
|
export const DIRECT_PAYMENT_UI_OPTIONS: Record<
|
|
725
|
-
|
|
735
|
+
| "digitalArt"
|
|
736
|
+
| "concertTicket"
|
|
737
|
+
| "subscription"
|
|
738
|
+
| "sneakers"
|
|
739
|
+
| "credits"
|
|
740
|
+
| "customButton",
|
|
726
741
|
DirectPaymentUIOptions
|
|
727
742
|
> = {
|
|
728
743
|
concertTicket: {
|
|
@@ -794,11 +809,26 @@ export const DIRECT_PAYMENT_UI_OPTIONS: Record<
|
|
|
794
809
|
token: USDC,
|
|
795
810
|
},
|
|
796
811
|
},
|
|
812
|
+
customButton: {
|
|
813
|
+
metadata: {
|
|
814
|
+
description: "Test custom button label functionality",
|
|
815
|
+
image: PRODUCT_METADATA.digitalArt.image,
|
|
816
|
+
title: "Custom Button Test",
|
|
817
|
+
},
|
|
818
|
+
mode: "direct_payment" as const,
|
|
819
|
+
buttonLabel: "Purchase Now",
|
|
820
|
+
paymentInfo: {
|
|
821
|
+
amount: "0.05",
|
|
822
|
+
feePayer: "sender" as const,
|
|
823
|
+
sellerAddress: RECEIVER_ADDRESSES.primary,
|
|
824
|
+
token: ETH,
|
|
825
|
+
},
|
|
826
|
+
},
|
|
797
827
|
};
|
|
798
828
|
|
|
799
829
|
// UI Options for Transaction mode
|
|
800
830
|
export const TRANSACTION_UI_OPTIONS: Record<
|
|
801
|
-
"ethTransfer" | "erc20Transfer" | "contractInteraction",
|
|
831
|
+
"ethTransfer" | "erc20Transfer" | "contractInteraction" | "customButton",
|
|
802
832
|
TransactionUIOptions
|
|
803
833
|
> = {
|
|
804
834
|
contractInteraction: {
|
|
@@ -825,4 +855,13 @@ export const TRANSACTION_UI_OPTIONS: Record<
|
|
|
825
855
|
mode: "transaction" as const,
|
|
826
856
|
transaction: ethTransferTransaction,
|
|
827
857
|
},
|
|
858
|
+
customButton: {
|
|
859
|
+
metadata: {
|
|
860
|
+
description: "Test custom button label for transactions",
|
|
861
|
+
title: "Custom Transaction",
|
|
862
|
+
},
|
|
863
|
+
mode: "transaction" as const,
|
|
864
|
+
buttonLabel: "Execute Now",
|
|
865
|
+
transaction: ethTransferTransaction,
|
|
866
|
+
},
|
|
828
867
|
};
|
|
@@ -3,7 +3,9 @@ export const ZKSYNC_SINGLETON_FACTORY =
|
|
|
3
3
|
export const CONTRACT_DEPLOYER_ADDRESS =
|
|
4
4
|
"0x0000000000000000000000000000000000008006" as const;
|
|
5
5
|
export const KNOWN_CODES_STORAGE = "0x0000000000000000000000000000000000008004";
|
|
6
|
-
export const PUBLISHED_PRIVATE_KEY = process
|
|
6
|
+
export const PUBLISHED_PRIVATE_KEY = process
|
|
7
|
+
? process.env.ZKSYNC_PUBLISHED_PRIVATE_KEY
|
|
8
|
+
: undefined;
|
|
7
9
|
|
|
8
10
|
export const singletonFactoryAbi = [
|
|
9
11
|
"function deploy(bytes32,bytes32,bytes) external payable",
|
package/src/utils/process.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export const IS_DEV =
|
|
2
|
-
process
|
|
2
|
+
process &&
|
|
3
|
+
(process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test");
|
|
3
4
|
|
|
4
|
-
export const IS_TEST = process.env.NODE_ENV === "test";
|
|
5
|
+
export const IS_TEST = process && process.env.NODE_ENV === "test";
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "5.105.
|
|
1
|
+
export const version = "5.105.29";
|