tradly 1.1.33 → 1.1.35
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/Constants/PathConstant.js +2 -0
- package/Roots/App.js +44 -0
- package/package.json +1 -1
package/Roots/App.js
CHANGED
|
@@ -76,6 +76,7 @@ import {
|
|
|
76
76
|
SSO_RETURN,
|
|
77
77
|
SSO_ENABLED,
|
|
78
78
|
TRANSLATIONS,
|
|
79
|
+
WALLET,
|
|
79
80
|
} from "./../Constants/PathConstant.js";
|
|
80
81
|
import serialization from "../Helper/Serialization.js";
|
|
81
82
|
import { ImageConfig } from "../Helper/APIParam.js";
|
|
@@ -3138,6 +3139,49 @@ class App {
|
|
|
3138
3139
|
return error;
|
|
3139
3140
|
}
|
|
3140
3141
|
}
|
|
3142
|
+
|
|
3143
|
+
// wallet
|
|
3144
|
+
async getWalletBalance(param = { authKey }) {
|
|
3145
|
+
try {
|
|
3146
|
+
const [error, responseJson] = await network.networkCall({
|
|
3147
|
+
path: `${WALLET}/balance`,
|
|
3148
|
+
method: Method.GET,
|
|
3149
|
+
authKey: param.authKey,
|
|
3150
|
+
currency: param.currency,
|
|
3151
|
+
language: param.language,
|
|
3152
|
+
});
|
|
3153
|
+
if (error) {
|
|
3154
|
+
return error;
|
|
3155
|
+
} else {
|
|
3156
|
+
return responseJson;
|
|
3157
|
+
}
|
|
3158
|
+
} catch (error) {
|
|
3159
|
+
return error;
|
|
3160
|
+
}
|
|
3161
|
+
}
|
|
3162
|
+
|
|
3163
|
+
async getWalletTransactions(param = { bodyParam, authKey }) {
|
|
3164
|
+
let url =
|
|
3165
|
+
param.bodyParam == undefined || param.bodyParam == ""
|
|
3166
|
+
? ""
|
|
3167
|
+
: `?${serialization(param.bodyParam)}`;
|
|
3168
|
+
try {
|
|
3169
|
+
const [error, responseJson] = await network.networkCall({
|
|
3170
|
+
path: `${WALLET}/transactions${url}`,
|
|
3171
|
+
method: Method.GET,
|
|
3172
|
+
authKey: param.authKey,
|
|
3173
|
+
currency: param.currency,
|
|
3174
|
+
language: param.language,
|
|
3175
|
+
});
|
|
3176
|
+
if (error) {
|
|
3177
|
+
return error;
|
|
3178
|
+
} else {
|
|
3179
|
+
return responseJson;
|
|
3180
|
+
}
|
|
3181
|
+
} catch (error) {
|
|
3182
|
+
return error;
|
|
3183
|
+
}
|
|
3184
|
+
}
|
|
3141
3185
|
}
|
|
3142
3186
|
const app = new App();
|
|
3143
3187
|
export default app;
|