@ecency/wallets 1.4.21 → 1.4.23
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/dist/browser/index.js +13 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/node/index.cjs +13 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.mjs +13 -1
- package/dist/node/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -941,12 +941,24 @@ function resolveHiveOperationFilters(filters) {
|
|
|
941
941
|
}
|
|
942
942
|
});
|
|
943
943
|
}
|
|
944
|
-
const filterArgs =
|
|
944
|
+
const filterArgs = makeBitMaskFilter(Array.from(operationIds));
|
|
945
945
|
return {
|
|
946
946
|
filterKey,
|
|
947
947
|
filterArgs
|
|
948
948
|
};
|
|
949
949
|
}
|
|
950
|
+
function makeBitMaskFilter(allowedOperations) {
|
|
951
|
+
let low = 0n;
|
|
952
|
+
let high = 0n;
|
|
953
|
+
allowedOperations.forEach((operation) => {
|
|
954
|
+
if (operation < 64) {
|
|
955
|
+
low |= 1n << BigInt(operation);
|
|
956
|
+
} else {
|
|
957
|
+
high |= 1n << BigInt(operation - 64);
|
|
958
|
+
}
|
|
959
|
+
});
|
|
960
|
+
return [low !== 0n ? low.toString() : null, high !== 0n ? high.toString() : null];
|
|
961
|
+
}
|
|
950
962
|
function getHiveAssetTransactionsQueryOptions(username, limit = 20, filters = []) {
|
|
951
963
|
const { filterArgs, filterKey } = resolveHiveOperationFilters(filters);
|
|
952
964
|
return infiniteQueryOptions({
|