@typeberry/lib 0.1.2-80d53fd → 0.1.2-8c85275
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +1 -5
- package/index.d.ts +1 -6
- package/index.js +1 -5
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -12397,16 +12397,12 @@ class PartiallyUpdatedState {
|
|
|
12397
12397
|
*
|
|
12398
12398
|
* NOTE the info may be updated compared to what is in the state.
|
|
12399
12399
|
*
|
|
12400
|
-
* Takes into account newly created services as well.
|
|
12400
|
+
* Takes into account ejected and newly created services as well.
|
|
12401
12401
|
*/
|
|
12402
12402
|
getServiceInfo(destination) {
|
|
12403
12403
|
if (destination === null) {
|
|
12404
12404
|
return null;
|
|
12405
12405
|
}
|
|
12406
|
-
const isEjected = this.stateUpdate.services.servicesRemoved.some((x) => x === destination);
|
|
12407
|
-
if (isEjected) {
|
|
12408
|
-
return null;
|
|
12409
|
-
}
|
|
12410
12406
|
const maybeNewService = this.stateUpdate.services.servicesUpdates.find((update) => update.serviceId === destination);
|
|
12411
12407
|
if (maybeNewService !== undefined) {
|
|
12412
12408
|
return maybeNewService.action.account;
|
package/index.d.ts
CHANGED
|
@@ -17150,18 +17150,13 @@ declare class PartiallyUpdatedState<T extends StateSlice = StateSlice> {
|
|
|
17150
17150
|
*
|
|
17151
17151
|
* NOTE the info may be updated compared to what is in the state.
|
|
17152
17152
|
*
|
|
17153
|
-
* Takes into account newly created services as well.
|
|
17153
|
+
* Takes into account ejected and newly created services as well.
|
|
17154
17154
|
*/
|
|
17155
17155
|
getServiceInfo(destination: ServiceId | null): ServiceAccountInfo | null {
|
|
17156
17156
|
if (destination === null) {
|
|
17157
17157
|
return null;
|
|
17158
17158
|
}
|
|
17159
17159
|
|
|
17160
|
-
const isEjected = this.stateUpdate.services.servicesRemoved.some((x) => x === destination);
|
|
17161
|
-
if (isEjected) {
|
|
17162
|
-
return null;
|
|
17163
|
-
}
|
|
17164
|
-
|
|
17165
17160
|
const maybeNewService = this.stateUpdate.services.servicesUpdates.find(
|
|
17166
17161
|
(update) => update.serviceId === destination,
|
|
17167
17162
|
);
|
package/index.js
CHANGED
|
@@ -12394,16 +12394,12 @@ class PartiallyUpdatedState {
|
|
|
12394
12394
|
*
|
|
12395
12395
|
* NOTE the info may be updated compared to what is in the state.
|
|
12396
12396
|
*
|
|
12397
|
-
* Takes into account newly created services as well.
|
|
12397
|
+
* Takes into account ejected and newly created services as well.
|
|
12398
12398
|
*/
|
|
12399
12399
|
getServiceInfo(destination) {
|
|
12400
12400
|
if (destination === null) {
|
|
12401
12401
|
return null;
|
|
12402
12402
|
}
|
|
12403
|
-
const isEjected = this.stateUpdate.services.servicesRemoved.some((x) => x === destination);
|
|
12404
|
-
if (isEjected) {
|
|
12405
|
-
return null;
|
|
12406
|
-
}
|
|
12407
12403
|
const maybeNewService = this.stateUpdate.services.servicesUpdates.find((update) => update.serviceId === destination);
|
|
12408
12404
|
if (maybeNewService !== undefined) {
|
|
12409
12405
|
return maybeNewService.action.account;
|