瀏覽代碼

datawriter returns hash

master
nitowa 2 週之前
父節點
當前提交
793a40a66c
共有 3 個檔案被更改,包括 6 行新增5 行删除
  1. 2
    2
      package-lock.json
  2. 1
    1
      package.json
  3. 3
    2
      src/RJSVM/datawriter/datawriter.ts

+ 2
- 2
package-lock.json 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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
         }

Loading…
取消
儲存