Skip to content

Commit 243bc5f

Browse files
committed
Default to chain id for rpc and bundler urls
1 parent e63fa43 commit 243bc5f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Assets/Thirdweb/Core/Scripts/ThirdwebManager.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public void Initialize(string chainIdentifier)
170170
throw new UnityException($"Could not add {chainData.identifier} to supported chains, RPC overrides must start with https:// or be left empty to use thirdweb RPCs!");
171171

172172
string rpc = string.IsNullOrEmpty(chainData.rpcOverride)
173-
? (string.IsNullOrEmpty(clientId) ? $"https://{chainData.identifier}.rpc.thirdweb.com/" : $"https://{chainData.identifier}.rpc.thirdweb.com/{clientId}")
173+
? (string.IsNullOrEmpty(clientId) ? $"https://{chainData.chainId}.rpc.thirdweb.com/" : $"https://{chainData.chainId}.rpc.thirdweb.com/{clientId}")
174174
: chainData.rpcOverride;
175175

176176
if (new System.Uri(rpc).Host.EndsWith(".thirdweb.com"))
@@ -282,8 +282,8 @@ public void Initialize(string chainIdentifier)
282282
{
283283
factoryAddress = factoryAddress,
284284
gasless = gasless,
285-
bundlerUrl = string.IsNullOrEmpty(bundlerUrl) ? $"https://{activeChain}.bundler.thirdweb.com" : bundlerUrl,
286-
paymasterUrl = string.IsNullOrEmpty(paymasterUrl) ? $"https://{activeChain}.bundler.thirdweb.com" : paymasterUrl,
285+
bundlerUrl = string.IsNullOrEmpty(bundlerUrl) ? $"https://{activeChainId}.bundler.thirdweb.com" : bundlerUrl,
286+
paymasterUrl = string.IsNullOrEmpty(paymasterUrl) ? $"https://{activeChainId}.bundler.thirdweb.com" : paymasterUrl,
287287
entryPointAddress = string.IsNullOrEmpty(entryPointAddress) ? Thirdweb.AccountAbstraction.Constants.DEFAULT_ENTRYPOINT_ADDRESS : entryPointAddress,
288288
};
289289

0 commit comments

Comments
 (0)