From 2f5d3f598acbab755bb4dcaa0d1b29b5560cb767 Mon Sep 17 00:00:00 2001 From: Aaron Cox Date: Fri, 7 Jul 2023 12:56:10 -0700 Subject: [PATCH] Uncommented call method --- src/contract.ts | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/src/contract.ts b/src/contract.ts index 184e25a..8f5e215 100644 --- a/src/contract.ts +++ b/src/contract.ts @@ -1,4 +1,14 @@ -import {ABI, ABIDef, APIClient, Name, NameType, Session} from '@wharfkit/session' +import { + ABI, + ABIDef, + ABISerializableObject, + Action, + APIClient, + Name, + NameType, + Session, + TransactResult, +} from '@wharfkit/session' import {Table} from './contract/table' @@ -66,19 +76,19 @@ export class Contract { * @param {Session} session - The session object to use to sign the transaction. * @return {Promise} A promise that resolves with the transaction data. */ - // async call( - // name: NameType, - // data: ABISerializableObject | {[key: string]: any}, - // session: Session - // ): Promise { - // const action: Action = Action.from({ - // account: this.account, - // name, - // authorization: [], - // data, - // }) + async call( + name: NameType, + data: ABISerializableObject | {[key: string]: any}, + session: Session + ): Promise { + const action: Action = Action.from({ + account: this.account, + name, + authorization: [], + data, + }) - // // Trigger the transaction using the session kit - // return session.transact({action}) - // } + // Trigger the transaction using the session kit + return session.transact({action}) + } }