diff --git a/CHANGELOG.md b/CHANGELOG.md index fdaf1715..f8987f4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. +## [8.10.1] 2024-08-26 + +### Changed + +- Typescript fixes +- fix an issue occurring when network 134 is already registered on ethers +- doc fixes + ## [8.10.0] 2024-07-24 ### Added diff --git a/docs/classes/Observable.md b/docs/classes/Observable.md index f10bffe7..ec80b61c 100644 --- a/docs/classes/Observable.md +++ b/docs/classes/Observable.md @@ -40,7 +40,7 @@ ▸ **subscribe**(`callbacks`): () => `void` -subscribe to a data source events via an Observer until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the retruned unsubscribe method. +subscribe to a data source events via an Observer until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the returned unsubscribe method. return the `unsubscribe: () => void` method. @@ -59,7 +59,7 @@ return the `unsubscribe: () => void` method. ▸ (): `void` -subscribe to a data source events via an Observer until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the retruned unsubscribe method. +subscribe to a data source events via an Observer until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the returned unsubscribe method. return the `unsubscribe: () => void` method. diff --git a/docs/classes/internal_.BridgeObservable.md b/docs/classes/internal_.BridgeObservable.md index 7d01d750..925490f5 100644 --- a/docs/classes/internal_.BridgeObservable.md +++ b/docs/classes/internal_.BridgeObservable.md @@ -40,7 +40,7 @@ ▸ **subscribe**(`callbacks`): () => `void` -subscribe and start the bridge process to transfer tokens from one chain to another until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the retruned cancel method. +subscribe and start the bridge process to transfer tokens from one chain to another until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the returned cancel method. return the `cancel: () => void` method. @@ -61,9 +61,9 @@ data: | Name | Type | | :------ | :------ | | `callbacks` | `Object` | -| `callbacks.complete` | () => `any` | -| `callbacks.error` | (`error`: `Error`) => `any` | -| `callbacks.next` | (`data`: { `bridgeAddress?`: `string` ; `dailyLimit?`: [`BN`](utils.BN.md) ; `maxPerTx?`: [`BN`](utils.BN.md) ; `message`: ``"CHECK_BRIDGE_POLICY"`` \| ``"BRIDGE_POLICY_CHECKED"`` \| ``"CHECK_BRIDGE_LIMIT"`` \| ``"BRIDGE_LIMIT_CHECKED"`` \| ``"SEND_TO_BRIDGE_TX_REQUEST"`` \| ``"SEND_TO_BRIDGE_TX_SUCCESS"`` \| ``"WAIT_RECEIVE_TX"`` \| ``"RECEIVE_TX_SUCCESS"`` ; `minPerTx?`: [`BN`](utils.BN.md) ; `totalSpentPerDay?`: [`BN`](utils.BN.md) ; `txHash?`: `string` }) => `any` | +| `callbacks.complete?` | () => `any` | +| `callbacks.error?` | (`error`: `Error`) => `any` | +| `callbacks.next?` | (`data`: { `bridgeAddress?`: `string` ; `dailyLimit?`: [`BN`](utils.BN.md) ; `maxPerTx?`: [`BN`](utils.BN.md) ; `message`: ``"CHECK_BRIDGE_POLICY"`` \| ``"BRIDGE_POLICY_CHECKED"`` \| ``"CHECK_BRIDGE_LIMIT"`` \| ``"BRIDGE_LIMIT_CHECKED"`` \| ``"SEND_TO_BRIDGE_TX_REQUEST"`` \| ``"SEND_TO_BRIDGE_TX_SUCCESS"`` \| ``"WAIT_RECEIVE_TX"`` \| ``"RECEIVE_TX_SUCCESS"`` ; `minPerTx?`: [`BN`](utils.BN.md) ; `totalSpentPerDay?`: [`BN`](utils.BN.md) ; `txHash?`: `string` }) => `any` | #### Returns @@ -71,7 +71,7 @@ data: ▸ (): `void` -subscribe and start the bridge process to transfer tokens from one chain to another until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the retruned cancel method. +subscribe and start the bridge process to transfer tokens from one chain to another until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the returned cancel method. return the `cancel: () => void` method. diff --git a/docs/classes/internal_.DealObservable.md b/docs/classes/internal_.DealObservable.md index a0f6782a..362529f4 100644 --- a/docs/classes/internal_.DealObservable.md +++ b/docs/classes/internal_.DealObservable.md @@ -40,7 +40,7 @@ ▸ **subscribe**(`callbacks`): () => `void` -subscribe to deal updates via an Observer until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the retruned unsubscribe method. +subscribe to deal updates via an Observer until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the returned unsubscribe method. return the `unsubscribe: () => void` method. @@ -66,7 +66,7 @@ data: ▸ (): `void` -subscribe to deal updates via an Observer until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the retruned unsubscribe method. +subscribe to deal updates via an Observer until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the returned unsubscribe method. return the `unsubscribe: () => void` method. diff --git a/docs/classes/internal_.ENSConfigurationObservable.md b/docs/classes/internal_.ENSConfigurationObservable.md index cd64958b..15c0af16 100644 --- a/docs/classes/internal_.ENSConfigurationObservable.md +++ b/docs/classes/internal_.ENSConfigurationObservable.md @@ -40,7 +40,7 @@ ▸ **subscribe**(`callbacks`): () => `void` -subscribe and start the ENS configuration process until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the retruned cancel method. +subscribe and start the ENS configuration process until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the returned cancel method. return the `cancel: () => void` method. @@ -73,7 +73,7 @@ data: ▸ (): `void` -subscribe and start the ENS configuration process until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the retruned cancel method. +subscribe and start the ENS configuration process until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the returned cancel method. return the `cancel: () => void` method. diff --git a/docs/classes/internal_.TaskObservable.md b/docs/classes/internal_.TaskObservable.md index 0c6e2a6c..a586d371 100644 --- a/docs/classes/internal_.TaskObservable.md +++ b/docs/classes/internal_.TaskObservable.md @@ -40,7 +40,7 @@ ▸ **subscribe**(`callbacks`): () => `void` -subscribe to task updates via an Observer until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the retruned unsubscribe method. +subscribe to task updates via an Observer until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the returned unsubscribe method. return the `unsubscribe: () => void` method. @@ -67,7 +67,7 @@ data: ▸ (): `void` -subscribe to task updates via an Observer until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the retruned unsubscribe method. +subscribe to task updates via an Observer until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the returned unsubscribe method. return the `unsubscribe: () => void` method. diff --git a/docs/modules.md b/docs/modules.md index 84fa7d9e..0a7baa5f 100644 --- a/docs/modules.md +++ b/docs/modules.md @@ -190,7 +190,7 @@ ___ Ƭ **NRLCAmount**: `number` \| `string` \| [`BN`](classes/utils.BN.md) -nRLC amount (nRLC stands for nano RLC, the smallest sub-division of the RLC token: 1 RLC = 1,000,000,000 RLC). +nRLC amount (nRLC stands for nano RLC, the smallest sub-division of the RLC token: 1 RLC = 1,000,000,000 nRLC). named units ('nRLC', 'RLC') can be used with the format `${amount} ${unit}` diff --git a/package-lock.json b/package-lock.json index a922198c..80417cfd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iexec", - "version": "8.10.0", + "version": "8.10.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iexec", - "version": "8.10.0", + "version": "8.10.1", "license": "Apache-2.0", "dependencies": { "@ensdomains/ens-contracts": "^0.0.22", diff --git a/package.json b/package.json index 6b14b4ad..b68de9b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iexec", - "version": "8.10.0", + "version": "8.10.1", "description": "iExec SDK", "bin": { "iexec": "./dist/esm/cli/cmd/iexec.js" diff --git a/src/common/generated/sdk/package.js b/src/common/generated/sdk/package.js index 3c51745f..c7ad4ffd 100644 --- a/src/common/generated/sdk/package.js +++ b/src/common/generated/sdk/package.js @@ -1,6 +1,6 @@ // this file is auto generated do not edit it /* eslint-disable */ export const name = "iexec"; -export const version = "8.10.0"; +export const version = "8.10.1"; export const description = "iExec SDK"; export default { name, version, description }; \ No newline at end of file diff --git a/src/common/types.d.ts b/src/common/types.d.ts index ac9dfe7f..a6b67a86 100644 --- a/src/common/types.d.ts +++ b/src/common/types.d.ts @@ -91,7 +91,7 @@ export type OrderHash = Bytes32; */ export type WeiAmount = number | string | BN; /** - * nRLC amount (nRLC stands for nano RLC, the smallest sub-division of the RLC token: 1 RLC = 1,000,000,000 RLC). + * nRLC amount (nRLC stands for nano RLC, the smallest sub-division of the RLC token: 1 RLC = 1,000,000,000 nRLC). * * named units ('nRLC', 'RLC') can be used with the format `${amount} ${unit}` * diff --git a/src/common/utils/config.js b/src/common/utils/config.js index 9f5671d2..f08e57db 100644 --- a/src/common/utils/config.js +++ b/src/common/utils/config.js @@ -99,8 +99,10 @@ export const getChainDefaults = ({ id, flavour }) => ({ export const isEnterpriseEnabled = (id) => !!enterpriseEnabledMap[id]; // register ethers unknown networks -const bellecourNetwork = new Network(networkMap[134].name, 134).attachPlugin( - new EnsPlugin(ensMap[134].registry, 134), -); -Network.register(bellecourNetwork.chainId, () => bellecourNetwork); -Network.register(bellecourNetwork.name, () => bellecourNetwork); +if (Network.from(134).name === 'unknown') { + const bellecourNetwork = new Network(networkMap[134].name, 134).attachPlugin( + new EnsPlugin(ensMap[134].registry, 134), + ); + Network.register(bellecourNetwork.chainId, () => bellecourNetwork); + Network.register(bellecourNetwork.name, () => bellecourNetwork); +} diff --git a/src/common/utils/reactive.d.ts b/src/common/utils/reactive.d.ts index 0a0c8b5e..d533b126 100644 --- a/src/common/utils/reactive.d.ts +++ b/src/common/utils/reactive.d.ts @@ -1,6 +1,6 @@ export class Observable { /** - * subscribe to a data source events via an Observer until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the retruned unsubscribe method. + * subscribe to a data source events via an Observer until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the returned unsubscribe method. * * return the `unsubscribe: () => void` method. */ diff --git a/src/lib/IExecDealModule.d.ts b/src/lib/IExecDealModule.d.ts index 5fd5f748..53045ff5 100644 --- a/src/lib/IExecDealModule.d.ts +++ b/src/lib/IExecDealModule.d.ts @@ -20,7 +20,7 @@ import { declare class DealObservable extends Observable { /** - * subscribe to deal updates via an Observer until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the retruned unsubscribe method. + * subscribe to deal updates via an Observer until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the returned unsubscribe method. * * return the `unsubscribe: () => void` method. * diff --git a/src/lib/IExecENSModule.d.ts b/src/lib/IExecENSModule.d.ts index 50d086d9..f183ea96 100644 --- a/src/lib/IExecENSModule.d.ts +++ b/src/lib/IExecENSModule.d.ts @@ -8,7 +8,7 @@ import { Address, ENS, TxHash } from '../common/types.js'; declare class ENSConfigurationObservable extends Observable { /** - * subscribe and start the ENS configuration process until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the retruned cancel method. + * subscribe and start the ENS configuration process until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the returned cancel method. * * return the `cancel: () => void` method. * diff --git a/src/lib/IExecTaskModule.d.ts b/src/lib/IExecTaskModule.d.ts index fd0025e3..f5eb34c6 100644 --- a/src/lib/IExecTaskModule.d.ts +++ b/src/lib/IExecTaskModule.d.ts @@ -36,7 +36,7 @@ interface Task { declare class TaskObservable extends Observable { /** - * subscribe to task updates via an Observer until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the retruned unsubscribe method. + * subscribe to task updates via an Observer until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the returned unsubscribe method. * * return the `unsubscribe: () => void` method. * diff --git a/src/lib/IExecWalletModule.d.ts b/src/lib/IExecWalletModule.d.ts index 59929ce9..95df6a87 100644 --- a/src/lib/IExecWalletModule.d.ts +++ b/src/lib/IExecWalletModule.d.ts @@ -15,7 +15,7 @@ import { Observable } from '../common/utils/reactive.js'; declare class BridgeObservable extends Observable { /** - * subscribe and start the bridge process to transfer tokens from one chain to another until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the retruned cancel method. + * subscribe and start the bridge process to transfer tokens from one chain to another until either `complete()` or `error(error: Error)` is called on the Observer or the subscribtion is canceled by calling the returned cancel method. * * return the `cancel: () => void` method. * @@ -47,7 +47,7 @@ declare class BridgeObservable extends Observable { * | `WAIT_RECEIVE_TX` | sent once if the bridged chain is configured | `bridgeAddress` | * | `RECEIVE_TX_SUCCESS` | sent once if the bridged chain is configured | `txHash` | */ - next: (data: { + next?: (data: { message: | 'CHECK_BRIDGE_POLICY' | 'BRIDGE_POLICY_CHECKED' @@ -69,13 +69,13 @@ declare class BridgeObservable extends Observable { * * no other callback is fired after firing `complete()` */ - complete: () => any; + complete?: () => any; /** * callback fired once when an error occurs * * no other callback is fired after firing `error(error: Error)` */ - error: (error: Error) => any; + error?: (error: Error) => any; }): /** * `cancel: () => void` method, calling this method cancels the subscription *