@keplr-wallet/stores-core 0.12.68 → 0.12.70
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.
|
@@ -29,6 +29,7 @@ export type SignInteractionData = {
|
|
|
29
29
|
signer: string;
|
|
30
30
|
pubKey: Uint8Array;
|
|
31
31
|
signDocBytes: Uint8Array;
|
|
32
|
+
isDirectAux?: boolean;
|
|
32
33
|
signOptions: KeplrSignOptions;
|
|
33
34
|
keyType: string;
|
|
34
35
|
keyInsensitive: PlainObject;
|
|
@@ -36,7 +37,9 @@ export type SignInteractionData = {
|
|
|
36
37
|
export declare class SignInteractionStore {
|
|
37
38
|
protected readonly interactionStore: InteractionStore;
|
|
38
39
|
constructor(interactionStore: InteractionStore);
|
|
39
|
-
get waitingDatas(): InteractionWaitingData<SignInteractionData
|
|
40
|
+
get waitingDatas(): InteractionWaitingData<SignInteractionData & {
|
|
41
|
+
signDocWrapper: SignDocWrapper;
|
|
42
|
+
}>[];
|
|
40
43
|
get waitingData(): InteractionWaitingData<SignInteractionData & {
|
|
41
44
|
signDocWrapper: SignDocWrapper;
|
|
42
45
|
}> | undefined;
|
|
@@ -24,7 +24,21 @@ class SignInteractionStore {
|
|
|
24
24
|
(0, mobx_1.makeObservable)(this);
|
|
25
25
|
}
|
|
26
26
|
get waitingDatas() {
|
|
27
|
-
return this.interactionStore
|
|
27
|
+
return this.interactionStore
|
|
28
|
+
.getAllData("request-sign-cosmos")
|
|
29
|
+
.map((data) => {
|
|
30
|
+
const wrapper = data.data.mode === "amino"
|
|
31
|
+
? cosmos_1.SignDocWrapper.fromAminoSignDoc(data.data.signDoc)
|
|
32
|
+
: data.data.isDirectAux
|
|
33
|
+
? cosmos_1.SignDocWrapper.fromDirectAuxSignDocBytes(data.data.signDocBytes)
|
|
34
|
+
: cosmos_1.SignDocWrapper.fromDirectSignDocBytes(data.data.signDocBytes);
|
|
35
|
+
return {
|
|
36
|
+
id: data.id,
|
|
37
|
+
type: data.type,
|
|
38
|
+
isInternal: data.isInternal,
|
|
39
|
+
data: Object.assign(Object.assign({}, data.data), { signDocWrapper: wrapper }),
|
|
40
|
+
};
|
|
41
|
+
});
|
|
28
42
|
}
|
|
29
43
|
get waitingData() {
|
|
30
44
|
const datas = this.waitingDatas;
|
|
@@ -34,7 +48,9 @@ class SignInteractionStore {
|
|
|
34
48
|
const data = datas[0];
|
|
35
49
|
const wrapper = data.data.mode === "amino"
|
|
36
50
|
? cosmos_1.SignDocWrapper.fromAminoSignDoc(data.data.signDoc)
|
|
37
|
-
:
|
|
51
|
+
: data.data.isDirectAux
|
|
52
|
+
? cosmos_1.SignDocWrapper.fromDirectAuxSignDocBytes(data.data.signDocBytes)
|
|
53
|
+
: cosmos_1.SignDocWrapper.fromDirectSignDocBytes(data.data.signDocBytes);
|
|
38
54
|
return {
|
|
39
55
|
id: data.id,
|
|
40
56
|
type: data.type,
|
|
@@ -71,6 +87,9 @@ class SignInteractionStore {
|
|
|
71
87
|
return this.interactionStore.isObsoleteInteraction(id);
|
|
72
88
|
}
|
|
73
89
|
}
|
|
90
|
+
__decorate([
|
|
91
|
+
mobx_1.computed
|
|
92
|
+
], SignInteractionStore.prototype, "waitingDatas", null);
|
|
74
93
|
__decorate([
|
|
75
94
|
mobx_1.computed
|
|
76
95
|
], SignInteractionStore.prototype, "waitingData", null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sign.js","sourceRoot":"","sources":["../../../src/core/interaction/sign.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,+BAAgD;AAChD,iDAAsD;
|
|
1
|
+
{"version":3,"file":"sign.js","sourceRoot":"","sources":["../../../src/core/interaction/sign.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,+BAAgD;AAChD,iDAAsD;AAqCtD,MAAa,oBAAoB;IAC/B,YAA+B,gBAAkC;QAAlC,qBAAgB,GAAhB,gBAAgB,CAAkB;QAC/D,IAAA,qBAAc,EAAC,IA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|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keplr-wallet/stores-core",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.70",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"author": "chainapsis",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
"lint-fix": "eslint --fix \"src/**/*\" && prettier --write \"src/**/*\""
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@keplr-wallet/background": "0.12.
|
|
20
|
-
"@keplr-wallet/common": "0.12.
|
|
21
|
-
"@keplr-wallet/cosmos": "0.12.
|
|
22
|
-
"@keplr-wallet/router": "0.12.
|
|
23
|
-
"@keplr-wallet/simple-fetch": "0.12.
|
|
24
|
-
"@keplr-wallet/stores": "0.12.
|
|
25
|
-
"@keplr-wallet/types": "0.12.
|
|
19
|
+
"@keplr-wallet/background": "0.12.70",
|
|
20
|
+
"@keplr-wallet/common": "0.12.70",
|
|
21
|
+
"@keplr-wallet/cosmos": "0.12.70",
|
|
22
|
+
"@keplr-wallet/router": "0.12.70",
|
|
23
|
+
"@keplr-wallet/simple-fetch": "0.12.70",
|
|
24
|
+
"@keplr-wallet/stores": "0.12.70",
|
|
25
|
+
"@keplr-wallet/types": "0.12.70",
|
|
26
26
|
"buffer": "^6.0.3",
|
|
27
27
|
"mobx": "^6.1.7",
|
|
28
28
|
"mobx-utils": "^6.0.3"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "43220d6107906925a899fcfc3d5cb4844344f263"
|
|
31
31
|
}
|
|
@@ -31,6 +31,7 @@ export type SignInteractionData =
|
|
|
31
31
|
signer: string;
|
|
32
32
|
pubKey: Uint8Array;
|
|
33
33
|
signDocBytes: Uint8Array;
|
|
34
|
+
isDirectAux?: boolean;
|
|
34
35
|
signOptions: KeplrSignOptions;
|
|
35
36
|
keyType: string;
|
|
36
37
|
keyInsensitive: PlainObject;
|
|
@@ -41,10 +42,30 @@ export class SignInteractionStore {
|
|
|
41
42
|
makeObservable(this);
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
@computed
|
|
46
|
+
get waitingDatas(): InteractionWaitingData<
|
|
47
|
+
SignInteractionData & { signDocWrapper: SignDocWrapper }
|
|
48
|
+
>[] {
|
|
49
|
+
return this.interactionStore
|
|
50
|
+
.getAllData<SignInteractionData>("request-sign-cosmos")
|
|
51
|
+
.map((data) => {
|
|
52
|
+
const wrapper =
|
|
53
|
+
data.data.mode === "amino"
|
|
54
|
+
? SignDocWrapper.fromAminoSignDoc(data.data.signDoc)
|
|
55
|
+
: data.data.isDirectAux
|
|
56
|
+
? SignDocWrapper.fromDirectAuxSignDocBytes(data.data.signDocBytes)
|
|
57
|
+
: SignDocWrapper.fromDirectSignDocBytes(data.data.signDocBytes);
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
id: data.id,
|
|
61
|
+
type: data.type,
|
|
62
|
+
isInternal: data.isInternal,
|
|
63
|
+
data: {
|
|
64
|
+
...data.data,
|
|
65
|
+
signDocWrapper: wrapper,
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
});
|
|
48
69
|
}
|
|
49
70
|
|
|
50
71
|
@computed
|
|
@@ -63,6 +84,8 @@ export class SignInteractionStore {
|
|
|
63
84
|
const wrapper =
|
|
64
85
|
data.data.mode === "amino"
|
|
65
86
|
? SignDocWrapper.fromAminoSignDoc(data.data.signDoc)
|
|
87
|
+
: data.data.isDirectAux
|
|
88
|
+
? SignDocWrapper.fromDirectAuxSignDocBytes(data.data.signDocBytes)
|
|
66
89
|
: SignDocWrapper.fromDirectSignDocBytes(data.data.signDocBytes);
|
|
67
90
|
|
|
68
91
|
return {
|