datawriter returns hash

This commit is contained in:
nitowa
2024-10-13 14:26:09 +02:00
parent 1dc838961f
commit 793a40a66c
3 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "rjsvm",
"version": "0.2.5",
"version": "0.3.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "rjsvm",
"version": "0.2.5",
"version": "0.3.1",
"license": "ISC",
"dependencies": {
"axios": "^1.7.7",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "rjsvm",
"version": "0.3.1",
"version": "0.3.2",
"description": "",
"main": "lib/src/main.js",
"scripts": {
+3 -2
View File
@@ -18,7 +18,7 @@ export class Datawriter {
}
async callEndpoint(endpointName: string, parameter: any, fee?: number) {
async callEndpoint(endpointName: string, parameter: any, fee?: number): Promise<string> {
const xrpio: xrpIO = new xrpIO(this.config.xrpNode)
await xrpio.connect()
try{
@@ -39,8 +39,9 @@ export class Datawriter {
undefined,
fee ? String(fee) : undefined
)
return hash
}catch(e){
console.log(e)
throw e
}finally{
await xrpio.disconnect()
}