Skip to content

Commit

Permalink
chore: upgrade packages
Browse files Browse the repository at this point in the history
  • Loading branch information
zmovane committed Aug 4, 2023
1 parent 0057104 commit ccb8c51
Show file tree
Hide file tree
Showing 8 changed files with 278 additions and 184 deletions.
7 changes: 2 additions & 5 deletions contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
{
"name": "@openos-labs/contracts",
"version": "1.0.0",
"name": "@openoscom/contracts",
"version": "1.2.1",
"main": "src/index.ts",
"license": "MIT",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
"repository": "https://github.com/openos-labs/imart-toolkit.git",
"scripts": {
"test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r ts-node/register 'test/**/creation.test.ts' --timeout 60000",
Expand Down
22 changes: 1 addition & 21 deletions contracts/src/evm/nft_lottery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,7 @@ export class NftLottery implements NftLotteryInterface {
}

async hasPermissionOf(contracts: Array<string>, user: string) : Promise<boolean> {
// const GetBalance = (contract: string): Promise<BigNumber> => {
// return new Promise(async (resolve, reject) => {
// try {
// await this.erc721(contract).balanceOf(user).then( i => {
// if(i) {
// resolve(i)
// return
// }
// reject()
// })
// } catch (error) {
// reject(error)
// }
// })
// }

// const fnArray = contracts.map(i => (async () => await GetBalance(i)))

// return Promise.all(fnArray).then((balances) => balances.every(i => i.iszero())).catch(_ => { return false })

return await Promise.all(contracts.map(async i => await this.erc721(i).balanceOf(user))).then((balances) => !balances.every(i => i.iszero())).catch(_ => { return false })
return await Promise.all(contracts.map(async i => await this.erc721(i).balanceOf(user))).then((balances) => !balances.every(i => i.isZero())).catch(_ => { return false })
}

async setApprovalForAll(
Expand Down
12 changes: 4 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
{
"name": "@openos-labs/imart-toolkit",
"version": "1.0.0",
"name": "@openoscom/imart-toolkit",
"version": "1.2.1",
"main": "./index.ts",
"description": "IMart frontend packages",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
"repository": "https://github.com/openos-labs/imart-toolkit.git",
"license": "ISC",
"bugs": {
Expand Down Expand Up @@ -54,9 +51,8 @@
"@dfinity/identity": "^0.10.2",
"@dfinity/principal": "^0.10.2",
"@manahippo/aptos-wallet-adapter": "1.0.10",
"@openos-labs/contracts": "1.0.0",
"@openos-labs/network": "1.0.0",
"@openoscom/network": "1.1.0",
"@openoscom/contracts": "^1.2.1",
"@openoscom/network": "^1.1.2",
"@opensea/seaport-js": "^1.0.8",
"@types/react": "^17.0.8",
"@types/react-dom": "^17.0.5",
Expand Down
2 changes: 0 additions & 2 deletions wallet/.npmrc

This file was deleted.

2 changes: 1 addition & 1 deletion wallet/Hook/WalletHook/Config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { AptosSpec } from "./APTOS";
import { EthereumSpec } from "./ETH";
import { PolygonSpec } from "./POLYGON";
import { BscSpec } from "./BSC";
import { Config } from "@openos-labs/contracts";
import { Config } from "@openoscom/contracts";
import { OPBNBSpec } from "./OPBNB";
import { ZkSyncSpec } from "./ZKSYNC";

Expand Down
2 changes: 1 addition & 1 deletion wallet/Hook/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export * from "./WalletHook/Config"

import { HookResponse, WalletHook } from "./WalletHook"
import { ChainResponse, ChainType, WalletType } from "./WalletHook/Types"
import { Contract, Contractor } from "@openos-labs/contracts"
import { Contract, Contractor } from "@openoscom/contracts"

declare global {
interface Window {
Expand Down
8 changes: 4 additions & 4 deletions wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openos-labs/wallet",
"version": "1.0.0",
"name": "@openoscom/wallet",
"version": "1.2.1",
"main": "index.ts",
"repository": "https://github.com/openos-labs/imart-toolkit.git",
"license": "MIT",
Expand All @@ -12,8 +12,8 @@
"@dfinity/identity": "^0.10.2",
"@dfinity/principal": "^0.10.2",
"@manahippo/aptos-wallet-adapter": "1.0.10",
"@openos-labs/contracts": "1.0.0",
"@openos-labs/network": "1.0.0",
"@openoscom/contracts": "^1.1.2",
"@openoscom/network": "^1.1.2",
"@opensea/seaport-js": "^1.0.8",
"@types/react": "^17.0.8",
"@types/react-dom": "^17.0.5",
Expand Down
Loading

0 comments on commit ccb8c51

Please sign in to comment.