Browse Source

datawriter returns hash

master
nitowa 2 weeks ago
parent
commit
793a40a66c
3 changed files with 6 additions and 5 deletions
  1. 2
    2
      package-lock.json
  2. 1
    1
      package.json
  3. 3
    2
      src/RJSVM/datawriter/datawriter.ts

+ 2
- 2
package-lock.json View File

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

+ 1
- 1
package.json View File

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

+ 3
- 2
src/RJSVM/datawriter/datawriter.ts View File

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
         const xrpio: xrpIO = new xrpIO(this.config.xrpNode)
22
         const xrpio: xrpIO = new xrpIO(this.config.xrpNode)
23
         await xrpio.connect()
23
         await xrpio.connect()
24
         try{
24
         try{
39
                 undefined,
39
                 undefined,
40
                 fee ? String(fee) : undefined
40
                 fee ? String(fee) : undefined
41
             )
41
             )
42
+            return hash
42
         }catch(e){
43
         }catch(e){
43
-            console.log(e)
44
+            throw e
44
         }finally{
45
         }finally{
45
             await xrpio.disconnect()
46
             await xrpio.disconnect()
46
         }
47
         }

Loading…
Cancel
Save