ggez-banking-sdk 0.1.40 → 0.1.42
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.
- package/dist/bank-system/constants/constants.d.ts +1 -1
- package/dist/bank-system/constants/constants.js +1 -1
- package/dist/bank-system/helper/dataStructure.js +1 -1
- package/dist/bank-system/interfaces/blockchain.d.ts +1 -1
- package/dist/bank-system/services/blockchain.d.ts +1 -1
- package/dist/bank-system/services/blockchain.js +4 -4
- package/dist/bank-system/utils/blockchainHelper.js +3 -3
- package/package.json +1 -1
@@ -17,5 +17,5 @@ var BlockchainRequestType;
|
|
17
17
|
BlockchainRequestType[BlockchainRequestType["Send"] = 1] = "Send";
|
18
18
|
BlockchainRequestType[BlockchainRequestType["Multi_Send"] = 2] = "Multi_Send";
|
19
19
|
BlockchainRequestType[BlockchainRequestType["Delegate"] = 3] = "Delegate";
|
20
|
-
BlockchainRequestType[BlockchainRequestType["
|
20
|
+
BlockchainRequestType[BlockchainRequestType["Undelegate"] = 4] = "Undelegate";
|
21
21
|
})(BlockchainRequestType || (exports.BlockchainRequestType = BlockchainRequestType = {}));
|
@@ -116,7 +116,7 @@ const Data = () => {
|
|
116
116
|
return GetMultiSendRequestData(values);
|
117
117
|
case constants_1.BlockchainRequestType.Delegate:
|
118
118
|
return GetDelegateRequestData(values);
|
119
|
-
case constants_1.BlockchainRequestType.
|
119
|
+
case constants_1.BlockchainRequestType.Undelegate:
|
120
120
|
return GetUndelegateRequestData(values);
|
121
121
|
default:
|
122
122
|
return null;
|
@@ -24,7 +24,6 @@ interface IBase {
|
|
24
24
|
source_id?: string;
|
25
25
|
};
|
26
26
|
authentication: IAuthentication[];
|
27
|
-
fee: ICoin;
|
28
27
|
}
|
29
28
|
export interface ISend {
|
30
29
|
address: string;
|
@@ -64,5 +63,6 @@ export interface IBlockchainData extends IBase {
|
|
64
63
|
delegate?: IDelegation;
|
65
64
|
undelegate?: IDelegation;
|
66
65
|
};
|
66
|
+
fee: ICoin | null;
|
67
67
|
}
|
68
68
|
export {};
|
@@ -19,7 +19,7 @@ export declare const useBlockchain: (token: string, userInfo: UserInfo, userId:
|
|
19
19
|
message: any;
|
20
20
|
status: string;
|
21
21
|
}>;
|
22
|
-
|
22
|
+
UndelegateRequest: (values: IUndelegateData) => Promise<{
|
23
23
|
response: any;
|
24
24
|
newUser: any;
|
25
25
|
message: any;
|
@@ -86,10 +86,10 @@ const useBlockchain = (token, userInfo, userId, baseUrl, lang) => {
|
|
86
86
|
};
|
87
87
|
}
|
88
88
|
};
|
89
|
-
const
|
89
|
+
const UndelegateRequest = async (values) => {
|
90
90
|
try {
|
91
|
-
const data = GetBlockchainRequestData(values, constants_1.BlockchainRequestType.
|
92
|
-
return await RequestHandler(data, constants_1.BlockchainRequestType.
|
91
|
+
const data = GetBlockchainRequestData(values, constants_1.BlockchainRequestType.Undelegate);
|
92
|
+
return await RequestHandler(data, constants_1.BlockchainRequestType.Undelegate);
|
93
93
|
}
|
94
94
|
catch (error) {
|
95
95
|
return {
|
@@ -104,7 +104,7 @@ const useBlockchain = (token, userInfo, userId, baseUrl, lang) => {
|
|
104
104
|
SendRequest,
|
105
105
|
MultiSendRequest,
|
106
106
|
DelegateRequest,
|
107
|
-
|
107
|
+
UndelegateRequest,
|
108
108
|
};
|
109
109
|
};
|
110
110
|
exports.useBlockchain = useBlockchain;
|
@@ -10,8 +10,8 @@ const GetKeyAndFunctionNameByRequestType = (requestType) => {
|
|
10
10
|
return { key: "multiSend", functionName: "MultiSendRequest" };
|
11
11
|
case constants_1.BlockchainRequestType.Delegate:
|
12
12
|
return { key: "delegate", functionName: "DelegateRequest" };
|
13
|
-
case constants_1.BlockchainRequestType.
|
14
|
-
return { key: "
|
13
|
+
case constants_1.BlockchainRequestType.Undelegate:
|
14
|
+
return { key: "undelegate", functionName: "UndelegateRequest" };
|
15
15
|
default:
|
16
16
|
return { key: "", functionName: "" };
|
17
17
|
}
|
@@ -29,7 +29,7 @@ const GetEndpointByRequestType = (requestType) => {
|
|
29
29
|
case constants_1.BlockchainRequestType.Delegate:
|
30
30
|
action = constants_1.BlockchainActions.Delegate;
|
31
31
|
break;
|
32
|
-
case constants_1.BlockchainRequestType.
|
32
|
+
case constants_1.BlockchainRequestType.Undelegate:
|
33
33
|
action = constants_1.BlockchainActions.Undelegate;
|
34
34
|
break;
|
35
35
|
default:
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ggez-banking-sdk",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.42",
|
4
4
|
"description": "A Node.js package to handle GGEZ Banking API endpoints, Simplify the process of managing CRUD operations with this efficient and easy-to-use package.",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|