@novasamatech/host-papp 0.6.15 → 0.6.16
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.
|
@@ -43,7 +43,7 @@ export const createAttestationService = (lazyClient) => {
|
|
|
43
43
|
const sudoCall = api.tx.Sudo.sudo({
|
|
44
44
|
call: increaseAllowanceCall.decodedCall,
|
|
45
45
|
});
|
|
46
|
-
return withRetry(() => sudoCall.signAndSubmit(createPeopleSigner(verifier)).then(() => undefined));
|
|
46
|
+
return withRetry(() => sudoCall.signAndSubmit(createPeopleSigner(verifier), { at: 'best' }).then(() => undefined));
|
|
47
47
|
}, toError);
|
|
48
48
|
return verifierAllowance.andThen(verifierAllowance => (verifierAllowance > 0 ? okAsync() : getAllowance()));
|
|
49
49
|
},
|
|
@@ -117,28 +117,23 @@ export const createAttestationService = (lazyClient) => {
|
|
|
117
117
|
},
|
|
118
118
|
});
|
|
119
119
|
const submitAttestation = () => new Promise((resolve, reject) => {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
const moduleError = event.dispatchError.value;
|
|
133
|
-
errorMessage = `${moduleError.type}.${moduleError.value?.type || 'Unknown'}`;
|
|
134
|
-
}
|
|
135
|
-
subscription.unsubscribe();
|
|
136
|
-
reject(errorMessage);
|
|
137
|
-
}
|
|
120
|
+
attestCall
|
|
121
|
+
.signAndSubmit(createPeopleSigner(verifier), { at: 'best' })
|
|
122
|
+
.then(event => {
|
|
123
|
+
if (event.ok) {
|
|
124
|
+
resolve();
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
// Extract error details
|
|
128
|
+
let errorMessage = 'Transaction failed';
|
|
129
|
+
if (event.dispatchError.type === 'Module') {
|
|
130
|
+
const moduleError = event.dispatchError.value;
|
|
131
|
+
errorMessage = `${moduleError.type}.${moduleError.value?.type || 'Unknown'}`;
|
|
138
132
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
})
|
|
133
|
+
reject(errorMessage);
|
|
134
|
+
}
|
|
135
|
+
})
|
|
136
|
+
.catch(error => reject(String(error)));
|
|
142
137
|
});
|
|
143
138
|
return fromPromise(withRetry(submitAttestation), toError).map(() => undefined);
|
|
144
139
|
})
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@novasamatech/host-papp",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.16",
|
|
5
5
|
"description": "Polkadot app integration",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"@noble/ciphers": "2.1.1",
|
|
30
30
|
"@noble/curves": "2.0.1",
|
|
31
31
|
"@noble/hashes": "2.0.1",
|
|
32
|
-
"@novasamatech/host-api": "0.6.
|
|
33
|
-
"@novasamatech/scale": "0.6.
|
|
34
|
-
"@novasamatech/statement-store": "0.6.
|
|
35
|
-
"@novasamatech/storage-adapter": "0.6.
|
|
32
|
+
"@novasamatech/host-api": "0.6.16",
|
|
33
|
+
"@novasamatech/scale": "0.6.16",
|
|
34
|
+
"@novasamatech/statement-store": "0.6.16",
|
|
35
|
+
"@novasamatech/storage-adapter": "0.6.16",
|
|
36
36
|
"@polkadot-api/utils": "0.2.0",
|
|
37
37
|
"@polkadot-api/substrate-bindings": "^0.17.0",
|
|
38
38
|
"@polkadot-labs/hdkd-helpers": "^0.0.28",
|