Quellcode durchsuchen

datawriter returns hash

master
nitowa vor 1 Monat
Ursprung
Commit
793a40a66c
3 geänderte Dateien mit 6 neuen und 5 gelöschten Zeilen
  1. 2
    2
      package-lock.json
  2. 1
    1
      package.json
  3. 3
    2
      src/RJSVM/datawriter/datawriter.ts

+ 2
- 2
package-lock.json Datei anzeigen

@@ -1,12 +1,12 @@
1 1
 {
2 2
   "name": "rjsvm",
3
-  "version": "0.2.5",
3
+  "version": "0.3.1",
4 4
   "lockfileVersion": 2,
5 5
   "requires": true,
6 6
   "packages": {
7 7
     "": {
8 8
       "name": "rjsvm",
9
-      "version": "0.2.5",
9
+      "version": "0.3.1",
10 10
       "license": "ISC",
11 11
       "dependencies": {
12 12
         "axios": "^1.7.7",

+ 1
- 1
package.json Datei anzeigen

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name": "rjsvm",
3
-  "version": "0.3.1",
3
+  "version": "0.3.2",
4 4
   "description": "",
5 5
   "main": "lib/src/main.js",
6 6
   "scripts": {

+ 3
- 2
src/RJSVM/datawriter/datawriter.ts Datei anzeigen

@@ -18,7 +18,7 @@ export class Datawriter {
18 18
     }
19 19
 
20 20
 
21
-    async callEndpoint(endpointName: string, parameter: any, fee?: number) {
21
+    async callEndpoint(endpointName: string, parameter: any, fee?: number): Promise<string> {
22 22
         const xrpio: xrpIO = new xrpIO(this.config.xrpNode)
23 23
         await xrpio.connect()
24 24
         try{
@@ -39,8 +39,9 @@ export class Datawriter {
39 39
                 undefined,
40 40
                 fee ? String(fee) : undefined
41 41
             )
42
+            return hash
42 43
         }catch(e){
43
-            console.log(e)
44
+            throw e
44 45
         }finally{
45 46
             await xrpio.disconnect()
46 47
         }

Laden…
Abbrechen
Speichern