Skip to content

Commit

Permalink
Merge branch 'master' into dl/fix-provider
Browse files Browse the repository at this point in the history
  • Loading branch information
douglance committed Oct 29, 2024
2 parents 48f7718 + 14b0d0f commit c29b29d
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/add-orbit-chain-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ body:
attributes:
label: Chain description
description: |
A short chain description that will be visible in the networks dropdown. Please make sure this is no longer than 130 characters.
A short chain description that will be visible in the networks dropdown.
placeholder: ex. An amazing chain that does amazing things.
validations:
required: true
required: false
- type: input
id: brand-color
attributes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ function NetworkRow({
<div className={twMerge('flex flex-col items-start gap-1')}>
<span className="truncate leading-[1.1]">{network.name}</span>
{network.description && (
<p className="whitespace-pre-wrap text-left text-xs leading-[1.15] text-white/70">
<p
className="line-clamp-3 text-left text-xs leading-[1.15] text-white/70"
title={network.description}
>
{network.description}
</p>
)}
Expand Down
4 changes: 0 additions & 4 deletions packages/arb-token-bridge-ui/src/util/orbitChainsData.json
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,6 @@
"nativeToken": "0x9C7BEBa8F6eF6643aBd725e45a4E8387eF260649",
"explorerUrl": "https://explorer.gravity.xyz",
"rpcUrl": "https://rpc.gravity.xyz",
"isArbitrum": true,
"isCustom": true,
"isTestnet": false,
"name": "Gravity Alpha",
Expand Down Expand Up @@ -595,7 +594,6 @@
"nativeToken": "0xcD2F22236DD9Dfe2356D7C543161D4d260FD9BcB",
"explorerUrl": "https://geist-mainnet.explorer.alchemy.com",
"rpcUrl": "https://geist-mainnet.g.alchemy.com/public",
"isArbitrum": true,
"isCustom": true,
"isTestnet": false,
"name": "Geist Mainnet",
Expand Down Expand Up @@ -644,7 +642,6 @@
},
"explorerUrl": "https://spotlight-mainnet.explorer.alchemy.com",
"rpcUrl": "https://spotlight-mainnet.g.alchemy.com/public",
"isArbitrum": true,
"isCustom": true,
"isTestnet": false,
"name": "Spotlight Mainnet",
Expand Down Expand Up @@ -970,7 +967,6 @@
"nativeToken": "0x79a1ca540e4b72280b8220e1fb6799cbca540bbd",
"explorerUrl": "https://socialnetwork-testnet.explorer.alchemy.com",
"rpcUrl": "https://socialnetwork-testnet.g.alchemy.com/public",
"isArbitrum": true,
"isCustom": true,
"isTestnet": true,
"name": "Social Testnet",
Expand Down
10 changes: 7 additions & 3 deletions packages/scripts/src/addOrbitChain/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,13 @@ export const colorHexSchema = z

export const descriptionSchema = z
.string()
.max(190)
.transform((desc) => (desc.endsWith(".") ? desc : `${desc}.`));
.optional()
.transform((desc) => {
if (!desc) {
return desc;
}
return desc.endsWith(".") ? desc : `${desc}.`;
});

export const ethBridgeSchema = z.object({
bridge: addressSchema,
Expand Down Expand Up @@ -136,7 +141,6 @@ export const chainSchema = z
nativeToken: addressSchema.optional(),
explorerUrl: urlSchema,
rpcUrl: urlSchema,
isArbitrum: z.boolean().default(true),
isCustom: z.boolean().default(true),
isTestnet: z.boolean(),
name: z.string().min(1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ export const mockOrbitChain: OrbitChain = {
nativeToken: "0x4Cb9a7AE498CEDcBb5EAe9f25736aE7d428C9D66",
explorerUrl: "https://explorer.xai-chain.net",
rpcUrl: "https://xai-chain.net/rpc",
isArbitrum: true,
isCustom: true,
isTestnet: false,
name: "Xai",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ exports[`Transforms > transformIncomingDataToOrbitChain > should transform incom
"sequencerInbox": "0x529a2061A1973be80D315770bA9469F3Da40D938",
},
"explorerUrl": "https://testexplorer.com",
"isArbitrum": true,
"isCustom": true,
"isTestnet": true,
"name": "Test Chain",
Expand Down Expand Up @@ -124,7 +123,6 @@ exports[`Transforms > updateOrbitChainsFile > should add a new testnet chain whi
\\"nativeToken\\": \\"0x4Cb9a7AE498CEDcBb5EAe9f25736aE7d428C9D66\\",
\\"explorerUrl\\": \\"https://explorer.xai-chain.net\\",
\\"rpcUrl\\": \\"https://xai-chain.net/rpc\\",
\\"isArbitrum\\": true,
\\"isCustom\\": true,
\\"isTestnet\\": true,
\\"name\\": \\"Xai\\",
Expand Down Expand Up @@ -181,7 +179,6 @@ exports[`Transforms > updateOrbitChainsFile > should handle updating an existing
\\"nativeToken\\": \\"0x4Cb9a7AE498CEDcBb5EAe9f25736aE7d428C9D66\\",
\\"explorerUrl\\": \\"https://explorer.xai-chain.net\\",
\\"rpcUrl\\": \\"https://xai-chain.net/rpc\\",
\\"isArbitrum\\": true,
\\"isCustom\\": true,
\\"isTestnet\\": false,
\\"name\\": \\"Updated Chain\\",
Expand Down Expand Up @@ -264,7 +261,6 @@ exports[`Transforms > updateOrbitChainsFile > should update the orbit chains fil
\\"nativeToken\\": \\"0x4Cb9a7AE498CEDcBb5EAe9f25736aE7d428C9D66\\",
\\"explorerUrl\\": \\"https://explorer.xai-chain.net\\",
\\"rpcUrl\\": \\"https://xai-chain.net/rpc\\",
\\"isArbitrum\\": true,
\\"isCustom\\": true,
\\"isTestnet\\": false,
\\"name\\": \\"Xai\\",
Expand Down
4 changes: 0 additions & 4 deletions packages/scripts/src/addOrbitChain/tests/schemas.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ describe("Validation Functions", () => {
expect(descriptionSchema.parse("A description")).toBe("A description.");
expect(descriptionSchema.parse("A description.")).toBe("A description.");
});

it("should throw for descriptions that are too long", () => {
expect(() => descriptionSchema.parse("A".repeat(251))).toThrow();
});
});

describe("ethBridgeSchema", () => {
Expand Down
1 change: 0 additions & 1 deletion packages/scripts/src/addOrbitChain/transforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,6 @@ export const transformIncomingDataToOrbitChain = async (
nativeToken: chainData.nativeTokenAddress,
explorerUrl: chainData.explorerUrl,
rpcUrl: chainData.rpcUrl,
isArbitrum: true,
isCustom: true,
isTestnet,
name: chainData.name,
Expand Down

0 comments on commit c29b29d

Please sign in to comment.