@leofcoin/endpoint-clients 0.3.9 → 0.3.10
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/exports/direct.js +4 -5
- package/exports/ws.js +1 -1
- package/package.json +1 -1
package/exports/direct.js
CHANGED
|
@@ -11,7 +11,7 @@ class Client {
|
|
|
11
11
|
get pubsub() {
|
|
12
12
|
return {
|
|
13
13
|
publish: globalThis.pubsub.publish,
|
|
14
|
-
subscribe: globalThis.pubsub.subscribe
|
|
14
|
+
subscribe: globalThis.pubsub.subscribe
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
balances() {
|
|
@@ -43,7 +43,7 @@ class Client {
|
|
|
43
43
|
return chain.getBlock(index);
|
|
44
44
|
}
|
|
45
45
|
blocks(amount) {
|
|
46
|
-
return
|
|
46
|
+
return globalThis.blockStore.values(amount);
|
|
47
47
|
}
|
|
48
48
|
sendTransaction(transaction) {
|
|
49
49
|
return chain.sendTransaction(transaction);
|
|
@@ -128,8 +128,7 @@ class Client {
|
|
|
128
128
|
if (amount.gt(0)) {
|
|
129
129
|
accountsHoldingAmount = accountsHoldingAmount.add(amount);
|
|
130
130
|
accountsHolding += 1;
|
|
131
|
-
topHolders.length < 100 &&
|
|
132
|
-
topHolders.push({ holder, amount: formatUnits(amount) });
|
|
131
|
+
topHolders.length < 100 && topHolders.push({ holder, amount: formatUnits(amount) });
|
|
133
132
|
}
|
|
134
133
|
}
|
|
135
134
|
return {
|
|
@@ -138,7 +137,7 @@ class Client {
|
|
|
138
137
|
accounts: await accountsStore.length(),
|
|
139
138
|
accountsHolding,
|
|
140
139
|
accountsHoldingAmount: formatUnits(accountsHoldingAmount).toString(),
|
|
141
|
-
topHolders
|
|
140
|
+
topHolders
|
|
142
141
|
};
|
|
143
142
|
}
|
|
144
143
|
getNonce(address) {
|
package/exports/ws.js
CHANGED