Skip to content

Commit

Permalink
Default to chain id for rpc and bundler urls
Browse files Browse the repository at this point in the history
  • Loading branch information
0xFirekeeper committed Dec 7, 2023
1 parent e63fa43 commit 243bc5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Assets/Thirdweb/Core/Scripts/ThirdwebManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public void Initialize(string chainIdentifier)
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!");

string rpc = string.IsNullOrEmpty(chainData.rpcOverride)
? (string.IsNullOrEmpty(clientId) ? $"https://{chainData.identifier}.rpc.thirdweb.com/" : $"https://{chainData.identifier}.rpc.thirdweb.com/{clientId}")
? (string.IsNullOrEmpty(clientId) ? $"https://{chainData.chainId}.rpc.thirdweb.com/" : $"https://{chainData.chainId}.rpc.thirdweb.com/{clientId}")
: chainData.rpcOverride;

if (new System.Uri(rpc).Host.EndsWith(".thirdweb.com"))
Expand Down Expand Up @@ -282,8 +282,8 @@ public void Initialize(string chainIdentifier)
{
factoryAddress = factoryAddress,
gasless = gasless,
bundlerUrl = string.IsNullOrEmpty(bundlerUrl) ? $"https://{activeChain}.bundler.thirdweb.com" : bundlerUrl,
paymasterUrl = string.IsNullOrEmpty(paymasterUrl) ? $"https://{activeChain}.bundler.thirdweb.com" : paymasterUrl,
bundlerUrl = string.IsNullOrEmpty(bundlerUrl) ? $"https://{activeChainId}.bundler.thirdweb.com" : bundlerUrl,
paymasterUrl = string.IsNullOrEmpty(paymasterUrl) ? $"https://{activeChainId}.bundler.thirdweb.com" : paymasterUrl,
entryPointAddress = string.IsNullOrEmpty(entryPointAddress) ? Thirdweb.AccountAbstraction.Constants.DEFAULT_ENTRYPOINT_ADDRESS : entryPointAddress,
};

Expand Down

0 comments on commit 243bc5f

Please sign in to comment.