Skip to content

Commit

Permalink
Merge pull request #5 from 0xPolygon/global0index
Browse files Browse the repository at this point in the history
fix: global index check
  • Loading branch information
nitinmittal23 authored Mar 19, 2024
2 parents 278574e + e9019b4 commit 0f2c193
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# LxLy SDK

[![GitHub version](https://badge.fury.io/gh/0xpolygon%2Flxly.js.svg)](https://badge.fury.io/gh/0xpolygon%2Flxly.js)
![Build Status](https://github.com/0xpolygon/lxly.js/workflows/CI/badge.svg?branch=master)
[![npm version](https://badge.fury.io/js/%400xpolygon%2Flxlyjs.svg)](https://badge.fury.io/js/%400xpolygon%2Flxlyjs)
![Build Status](https://github.com/0xpolygon/lxly.js/workflows/CI/badge.svg?branch=main)
[![npm version](https://badge.fury.io/js/%400xpolygon%2Flxlyjs.svg)](https://badge.fury.io/js/%40maticnetwork%2Flxlyjs)
![GitHub](https://img.shields.io/github/license/0xpolygon/lxly.js)

This repository contains the `lxlyjs` client library. `lxlyjs` makes it easy for developers, who may not be deeply familiar with smart contract development, to interact with the various components of Polygon LxLy Aggregator bridge.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@maticnetwork/lxlyjs",
"version": "0.0.2",
"version": "0.0.3",
"description": "Javascript developer library for interacting with Polygon LxLy Bridge",
"main": "dist/npm.export.js",
"types": "dist/ts/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/lxly/bridge_util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class BridgeUtil {
}

computeGlobalIndex(indexLocal: number, indexRollup: number, sourceNetworkId: number) {
if (sourceNetworkId === 0) {
if (BigInt(sourceNetworkId) === BigInt(0)) {
return BigInt(indexLocal) + _GLOBAL_INDEX_MAINNET_FLAG;
} else {
return BigInt(indexLocal) + BigInt(indexRollup) * BigInt(2 ** 32);
Expand Down

0 comments on commit 0f2c193

Please sign in to comment.