@typeberry/lib 0.1.2-753d258 → 0.1.2-80d53fd
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 +5 -1
- package/index.d.ts +6 -1
- package/index.js +5 -1
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -12397,12 +12397,16 @@ 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
|
|
12400
|
+
* Takes into account 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
|
+
}
|
|
12406
12410
|
const maybeNewService = this.stateUpdate.services.servicesUpdates.find((update) => update.serviceId === destination);
|
|
12407
12411
|
if (maybeNewService !== undefined) {
|
|
12408
12412
|
return maybeNewService.action.account;
|
package/index.d.ts
CHANGED
|
@@ -17150,13 +17150,18 @@ 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
|
|
17153
|
+
* Takes into account 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
|
+
|
|
17160
17165
|
const maybeNewService = this.stateUpdate.services.servicesUpdates.find(
|
|
17161
17166
|
(update) => update.serviceId === destination,
|
|
17162
17167
|
);
|
package/index.js
CHANGED
|
@@ -12394,12 +12394,16 @@ 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
|
|
12397
|
+
* Takes into account 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
|
+
}
|
|
12403
12407
|
const maybeNewService = this.stateUpdate.services.servicesUpdates.find((update) => update.serviceId === destination);
|
|
12404
12408
|
if (maybeNewService !== undefined) {
|
|
12405
12409
|
return maybeNewService.action.account;
|