We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb57edc commit 36c7543Copy full SHA for 36c7543
src/hooks/useSend.js
@@ -14,7 +14,10 @@ export const useSend = () => {
14
throw new Error("Signer required");
15
}
16
17
- return (await tx.paymentInfo(signer)).weight.toNumber();
+ if (tx.hasPaymentInfo) {
18
+ return (await tx.paymentInfo(signer)).weight.toNumber();
19
+ }
20
+ return 0;
21
};
22
23
const checkWeight = async (tx, owner) => {
src/hooks/useSubscription.js
@@ -86,7 +86,7 @@ export const useSubscription = (initialOwner = null) => {
86
const DAYS_TO_MS = 24 * 60 * 60 * 1000;
87
88
const getFreeWeightCalc = async (owner) => {
89
- const ledger = await getLedger(owner);
+ const ledger = (await getLedger(owner)).data;
90
if (!ledger) {
91
return -1;
92
0 commit comments