You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/cactus-plugin-satp-hermes/src/main/typescript/services/validation/config-validating-functions/bridges-config-validating-functions/validate-besu-config.ts
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -94,8 +94,12 @@ function isWeb3SigningCredentialNone(
94
94
}
95
95
96
96
// Type guard for Web3SigningCredential
97
-
functionisWeb3SigningCredential(obj: unknown): obj is Web3SigningCredential{
97
+
functionisWeb3SigningCredential(
98
+
obj: unknown,
99
+
log: Logger,
100
+
): obj is Web3SigningCredential{
98
101
if(!obj||typeofobj!=="object"){
102
+
log.error("isWeb3SigningCredential: obj is not an object or is null");
Copy file name to clipboardExpand all lines: packages/cactus-plugin-satp-hermes/src/main/typescript/services/validation/config-validating-functions/bridges-config-validating-functions/validate-besu-options.ts
Copy file name to clipboardExpand all lines: packages/cactus-plugin-satp-hermes/src/main/typescript/services/validation/config-validating-functions/bridges-config-validating-functions/validate-bungee-options.ts
Copy file name to clipboardExpand all lines: packages/cactus-plugin-satp-hermes/src/main/typescript/services/validation/config-validating-functions/bridges-config-validating-functions/validate-ethereum-config.ts
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -113,8 +113,12 @@ function isWeb3SigningCredentialNone(
113
113
}
114
114
115
115
// Type guard for Web3SigningCredential
116
-
functionisWeb3SigningCredential(obj: unknown): obj is Web3SigningCredential{
116
+
functionisWeb3SigningCredential(
117
+
obj: unknown,
118
+
log: Logger,
119
+
): obj is Web3SigningCredential{
117
120
if(!obj||typeofobj!=="object"){
121
+
log.error("isWeb3SigningCredential: obj is not an object or is null");
118
122
returnfalse;
119
123
}
120
124
return(
@@ -125,8 +129,9 @@ function isWeb3SigningCredential(obj: unknown): obj is Web3SigningCredential {
125
129
);
126
130
}
127
131
128
-
functionisGasConfig(obj: unknown): obj is GasTransactionConfig{
132
+
functionisGasConfig(obj: unknown,log: Logger): obj is GasTransactionConfig{
129
133
if(!obj||typeofobj!=="object"){
134
+
log.error("isGasConfig: obj null or not obj");
130
135
thrownewTypeError(
131
136
"isGasConfig: obj null or not obj"+JSON.stringify(obj),
132
137
);
@@ -186,10 +191,6 @@ export function isEthereumConfigJSON(
Copy file name to clipboardExpand all lines: packages/cactus-plugin-satp-hermes/src/main/typescript/services/validation/config-validating-functions/bridges-config-validating-functions/validate-ethereum-options.ts
Copy file name to clipboardExpand all lines: packages/cactus-plugin-satp-hermes/src/main/typescript/services/validation/config-validating-functions/bridges-config-validating-functions/validate-fabric-config.ts
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -126,46 +126,46 @@ function isFabricSigningCredential(
126
126
);
127
127
}
128
128
129
-
functionisUserIdentity(obj: unknown,log?: Logger): obj is X509Identity{
129
+
functionisUserIdentity(obj: unknown,log: Logger): obj is X509Identity{
130
130
constobjRecord=objasRecord<string,unknown>;
131
131
if(typeofobj!=="object"||obj===null){
132
-
log!.error("isUserIdentity: obj is not an object or is null");
132
+
log.error("isUserIdentity: obj is not an object or is null");
Copy file name to clipboardExpand all lines: packages/cactus-plugin-satp-hermes/src/main/typescript/services/validation/config-validating-functions/bridges-config-validating-functions/validate-fabric-options.ts
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -254,18 +254,18 @@ function isSignPayloadCallback(
254
254
// Type guard for FabricOptionsJSON
255
255
exportfunctionisFabricOptionsJSON(
256
256
obj: unknown,
257
-
log?: Logger,
257
+
log: Logger,
258
258
): obj is FabricOptionsJSON{
259
259
if(typeofobj!=="object"||obj===null){
260
-
log!.error("FabricOptionsJSON is not an object:",obj);
260
+
log.error("FabricOptionsJSON is not an object:",obj);
261
261
returnfalse;
262
262
}
263
263
constobjRecord=objasRecord<string,unknown>;
264
264
if(
265
265
"dockerNetworkName"inobj&&
266
266
typeofobjRecord.dockerNetworkName!=="string"
267
267
){
268
-
log!.error(
268
+
log.error(
269
269
"FabricOptionsJSON invalid 'dockerNetworkName':",
270
270
objRecord.dockerNetworkName,
271
271
);
@@ -275,54 +275,54 @@ export function isFabricOptionsJSON(
Copy file name to clipboardExpand all lines: packages/cactus-plugin-satp-hermes/src/main/typescript/services/validation/config-validating-functions/validate-key-pair-json.ts
+27-13Lines changed: 27 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1,28 +1,42 @@
1
+
import{Logger}from"@hyperledger/cactus-common";
2
+
1
3
exportinterfaceKeyPairJSON{
2
4
privateKey: string;
3
5
publicKey: string;
4
6
}
5
7
6
8
// Type guard for the keyPairJSON
7
-
exportfunctionisKeyPairJSON(obj: unknown): obj is KeyPairJSON{
0 commit comments