datawriter returns hash
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user