@novasamatech/host-papp 0.6.16 → 0.7.0-0
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.
|
@@ -117,23 +117,28 @@ export const createAttestationService = (lazyClient) => {
|
|
|
117
117
|
},
|
|
118
118
|
});
|
|
119
119
|
const submitAttestation = () => new Promise((resolve, reject) => {
|
|
120
|
-
attestCall
|
|
121
|
-
.
|
|
122
|
-
.
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
120
|
+
const subscription = attestCall
|
|
121
|
+
.signSubmitAndWatch(createPeopleSigner(verifier), { at: 'best' })
|
|
122
|
+
.subscribe({
|
|
123
|
+
next(event) {
|
|
124
|
+
if ((event.type === 'txBestBlocksState' && event.found) || event.type === 'finalized') {
|
|
125
|
+
subscription.unsubscribe();
|
|
126
|
+
if (event.ok) {
|
|
127
|
+
resolve();
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
let errorMessage = 'Transaction failed';
|
|
131
|
+
if (event.dispatchError?.type === 'Module') {
|
|
132
|
+
const moduleError = event.dispatchError.value;
|
|
133
|
+
errorMessage = `${moduleError.type}.${moduleError.value?.type ?? 'Unknown'}`;
|
|
134
|
+
}
|
|
135
|
+
reject(new Error(errorMessage));
|
|
136
|
+
}
|
|
132
137
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
138
|
+
},
|
|
139
|
+
error: reject,
|
|
140
|
+
complete: () => reject(new Error('Transaction observable completed without best block confirmation')),
|
|
141
|
+
});
|
|
137
142
|
});
|
|
138
143
|
return fromPromise(withRetry(submitAttestation), toError).map(() => undefined);
|
|
139
144
|
})
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@novasamatech/host-papp",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.0-0",
|
|
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.
|
|
33
|
-
"@novasamatech/scale": "0.
|
|
34
|
-
"@novasamatech/statement-store": "0.
|
|
35
|
-
"@novasamatech/storage-adapter": "0.
|
|
32
|
+
"@novasamatech/host-api": "0.7.0-0",
|
|
33
|
+
"@novasamatech/scale": "0.7.0-0",
|
|
34
|
+
"@novasamatech/statement-store": "0.7.0-0",
|
|
35
|
+
"@novasamatech/storage-adapter": "0.7.0-0",
|
|
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",
|