Skip to content

Commit a235c7e

Browse files
committed
Merge branch 'main' into greg/cnct-2213-siteembed-component
2 parents 38f0d32 + 5398cb4 commit a235c7e

File tree

8 files changed

+42
-38
lines changed

8 files changed

+42
-38
lines changed
Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
const LOGGED_IN_ONLY_PATHS = [
2-
// anything that _starts_ with /dashboard is logged in only
3-
"/dashboard",
4-
// team pages are logged in only
5-
"/team",
6-
// anything that _starts_ with /cli is logged in only
7-
"/cli",
8-
// publish page
9-
"/contracts/publish",
10-
];
11-
121
export function isLoginRequired(pathname: string) {
13-
return LOGGED_IN_ONLY_PATHS.some((path) => pathname.startsWith(path));
2+
// remove '/' in front and then split by '/'
3+
const paths = pathname.slice(1).split("/");
4+
5+
// /dashboard, /team, /cli
6+
if (paths[0] === "dashboard" || paths[0] === "team" || paths[0] === "cli") {
7+
return true;
8+
}
9+
10+
// /contracts/publish
11+
if (paths[0] === "contracts" && paths[1] === "publish") {
12+
return true;
13+
}
14+
15+
return false;
1416
}

apps/dashboard/src/components/engine/engine-instances-table.tsx

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -430,34 +430,22 @@ function DeleteSubscriptionModalContent(props: {
430430

431431
<form onSubmit={form.handleSubmit(onSubmit)}>
432432
{/* Reason */}
433-
<FormControl isRequired>
433+
<FormControl>
434434
<FormLabel className="!text-base">
435435
Please share your feedback to help us improve Engine.
436436
</FormLabel>
437437
<RadioGroup>
438438
<div className="flex flex-col gap-2">
439-
<Radio
440-
value="USING_SELF_HOSTED"
441-
{...form.register("reason", { required: true })}
442-
>
439+
<Radio value="USING_SELF_HOSTED" {...form.register("reason")}>
443440
<span className="text-sm"> Migrating to self-hosted </span>
444441
</Radio>
445-
<Radio
446-
value="TOO_EXPENSIVE"
447-
{...form.register("reason", { required: true })}
448-
>
442+
<Radio value="TOO_EXPENSIVE" {...form.register("reason")}>
449443
<span className="text-sm"> Too expensive </span>
450444
</Radio>
451-
<Radio
452-
value="MISSING_FEATURES"
453-
{...form.register("reason", { required: true })}
454-
>
445+
<Radio value="MISSING_FEATURES" {...form.register("reason")}>
455446
<span className="text-sm"> Missing features </span>
456447
</Radio>
457-
<Radio
458-
value="OTHER"
459-
{...form.register("reason", { required: true })}
460-
>
448+
<Radio value="OTHER" {...form.register("reason")}>
461449
<span className="text-sm"> Other </span>
462450
</Radio>
463451
</div>

packages/thirdweb/.size-limit.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
{
2020
"name": "thirdweb/chains (tree-shaking)",
2121
"path": "./dist/esm/exports/chains.js",
22-
"limit": "500 B",
22+
"limit": "600 B",
2323
"import": "{ ethereum }"
2424
},
2525
{

packages/thirdweb/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# thirdweb
22

3+
## 5.65.1
4+
5+
### Patch Changes
6+
7+
- [#5277](https://github.com/thirdweb-dev/js/pull/5277) [`58fb28d`](https://github.com/thirdweb-dev/js/commit/58fb28de297e5a81be18a185d495425e29913a0b) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Respect bundlerUrl in waitForUserReceipt
8+
39
## 5.65.0
410

511
### Minor Changes

packages/thirdweb/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "thirdweb",
3-
"version": "5.65.0",
3+
"version": "5.65.1",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/thirdweb-dev/js.git#main"

packages/thirdweb/src/utils/any-evm/zksync/isZkSyncChain.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,20 @@ export async function isZkSyncChain(chain: Chain) {
1616
chain.id === 4654 ||
1717
chain.id === 333271 ||
1818
chain.id === 37111 ||
19-
chain.id === 978658
19+
chain.id === 978658 ||
20+
chain.id === 531050104 ||
21+
chain.id === 4457845
2022
) {
2123
return true;
2224
}
2325

24-
return false;
26+
// fallback to checking the stack on rpc
27+
try {
28+
const { getChainMetadata } = await import("../../../chains/utils.js");
29+
const chainMetadata = await getChainMetadata(chain);
30+
return chainMetadata.stackType === "zksync_stack";
31+
} catch {
32+
// If the network check fails, assume it's not a ZkSync chain
33+
return false;
34+
}
2535
}

packages/thirdweb/src/wallets/smart/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ async function _sendUserOp(args: {
624624
});
625625
// wait for tx receipt rather than return the userOp hash
626626
const receipt = await waitForUserOpReceipt({
627-
...options,
627+
...bundlerOptions,
628628
userOpHash,
629629
});
630630

packages/thirdweb/src/wallets/utils/getWalletBalance.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { ANVIL_CHAIN } from "~test/chains.js";
33
import { TEST_CONTRACT_URI } from "~test/ipfs-uris.js";
44
import { TEST_CLIENT } from "~test/test-clients.js";
55
import { TEST_ACCOUNT_A } from "~test/test-wallets.js";
6-
import { defineChain } from "../../chains/utils.js";
76
import { getContract } from "../../contract/contract.js";
87
import { mintTo } from "../../extensions/erc20/write/mintTo.js";
98
import { deployERC20Contract } from "../../extensions/prebuilts/deploy-erc20.js";
@@ -57,12 +56,11 @@ describe.runIf(process.env.TW_SECRET_KEY)("getWalletBalance", () => {
5756
expect(result.displayValue).toBe(amount.toString());
5857
});
5958

60-
it("should work for un-named token", async () => {
59+
it("should work for native currency", async () => {
6160
const result = await getWalletBalance({
6261
address: TEST_ACCOUNT_A.address,
6362
client: TEST_CLIENT,
64-
chain: defineChain(97),
65-
tokenAddress: "0xd66c6B4F0be8CE5b39D52E0Fd1344c389929B378",
63+
chain: ANVIL_CHAIN,
6664
});
6765
expect(result).toBeDefined();
6866
expect(result.decimals).toBe(18);

0 commit comments

Comments
 (0)