@ecency/wallets 1.4.22 → 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/node/index.cjs
CHANGED
|
@@ -968,12 +968,24 @@ function resolveHiveOperationFilters(filters) {
|
|
|
968
968
|
}
|
|
969
969
|
});
|
|
970
970
|
}
|
|
971
|
-
const filterArgs =
|
|
971
|
+
const filterArgs = makeBitMaskFilter(Array.from(operationIds));
|
|
972
972
|
return {
|
|
973
973
|
filterKey,
|
|
974
974
|
filterArgs
|
|
975
975
|
};
|
|
976
976
|
}
|
|
977
|
+
function makeBitMaskFilter(allowedOperations) {
|
|
978
|
+
let low = 0n;
|
|
979
|
+
let high = 0n;
|
|
980
|
+
allowedOperations.forEach((operation) => {
|
|
981
|
+
if (operation < 64) {
|
|
982
|
+
low |= 1n << BigInt(operation);
|
|
983
|
+
} else {
|
|
984
|
+
high |= 1n << BigInt(operation - 64);
|
|
985
|
+
}
|
|
986
|
+
});
|
|
987
|
+
return [low !== 0n ? low.toString() : null, high !== 0n ? high.toString() : null];
|
|
988
|
+
}
|
|
977
989
|
function getHiveAssetTransactionsQueryOptions(username, limit = 20, filters = []) {
|
|
978
990
|
const { filterArgs, filterKey } = resolveHiveOperationFilters(filters);
|
|
979
991
|
return reactQuery.infiniteQueryOptions({
|