Skip to content

Commit

Permalink
fix: network resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
josemarinas committed May 21, 2024
1 parent 83eb321 commit edde038
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/utils/library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ import {
SupportedVersions,
getLatestNetworkDeployment,
getNetworkDeployments,
getNetworkNameByAlias,
} from '@aragon/osx-commons-configs';

export function formatUnits(amount: BigNumberish, decimals: number) {
Expand Down Expand Up @@ -846,9 +847,10 @@ export function sleepFor(time = 600) {
* @returns translated equivalent app supported network
*/
export const translateToAppNetwork = (
sdkNetwork: SdkContext['network']
ethersNetwork: SdkContext['network']
): SupportedNetworks => {
switch (sdkNetwork.name as SdkSupportedNetworks) {
const sdkNetwork = getNetworkNameByAlias(ethersNetwork.name);
switch (sdkNetwork as SdkSupportedNetworks) {
case SdkSupportedNetworks.ARBITRUM:
return 'arbitrum';
case SdkSupportedNetworks.BASE:
Expand Down

0 comments on commit edde038

Please sign in to comment.