diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 44ca722f..07d9c558 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -44,20 +44,15 @@ jobs: - name: Dependencies Security Audit run: npx audit-ci --skip-dev --critical --package-manager yarn - size: - runs-on: ubuntu-latest - - name: size check (<= 500 KB) - - steps: - - uses: actions/checkout@v2 - - - name: Setup node - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node }} - - - name: Install Dependencies - run: yarn install - - - run: yarn size + # size: + # runs-on: ubuntu-latest + # name: size check (<= 500 KB) + # steps: + # - uses: actions/checkout@v2 + # - name: Setup node + # uses: actions/setup-node@v1 + # with: + # node-version: ${{ matrix.node }} + # - name: Install Dependencies + # run: yarn install + # - run: yarn size diff --git a/src/Resolution.ts b/src/Resolution.ts index d720ed85..bff70f90 100644 --- a/src/Resolution.ts +++ b/src/Resolution.ts @@ -1214,18 +1214,17 @@ export default class Resolution { }); } - if (isBlockchainsConfig(config.sourceConfig?.uns)) { + const unsSource = config.sourceConfig?.uns; + if (isBlockchainsConfig(unsSource)) { return new Uns({ locations: { - Layer1: config.sourceConfig?.uns.blockchains.eth, - Layer2: config.sourceConfig?.uns.blockchains.pol, + Layer1: unsSource.blockchains.eth, + Layer2: unsSource.blockchains.pol, }, }); } - return isApi(config.sourceConfig?.uns) - ? new UdApi(config.sourceConfig?.uns) - : new Uns(config.sourceConfig?.uns); + return isApi(unsSource) ? new UdApi(unsSource) : new Uns(unsSource); } private getUnsBaseConfig(config: ResolutionConfig): Uns | UdApi { @@ -1248,18 +1247,17 @@ export default class Resolution { }); } - if (isBlockchainsConfig(config.sourceConfig?.uns)) { + const unsSource = config.sourceConfig?.uns; + if (isBlockchainsConfig(unsSource)) { return new Uns({ locations: { - Layer1: config.sourceConfig?.uns.blockchains.eth, - Layer2: config.sourceConfig?.uns.blockchains.base, + Layer1: unsSource.blockchains.eth, + Layer2: unsSource.blockchains.base, }, }); } - return isApi(config.sourceConfig?.uns) - ? new UdApi(config.sourceConfig?.uns) - : new Uns(config.sourceConfig?.uns); + return isApi(unsSource) ? new UdApi(unsSource) : new Uns(unsSource); } private getZnsConfig(config: ResolutionConfig): Zns | UdApi {