Skip to content

Commit

Permalink
Uncommented call method
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroncox committed Jul 7, 2023
1 parent 7cdecd8 commit 2f5d3f5
Showing 1 changed file with 25 additions and 15 deletions.
40 changes: 25 additions & 15 deletions src/contract.ts
Original file line number Diff line number Diff line change
@@ -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'

Expand Down Expand Up @@ -66,19 +76,19 @@ export class Contract {
* @param {Session} session - The session object to use to sign the transaction.
* @return {Promise<TransactResult>} A promise that resolves with the transaction data.
*/
// async call(
// name: NameType,
// data: ABISerializableObject | {[key: string]: any},
// session: Session
// ): Promise<TransactResult> {
// const action: Action = Action.from({
// account: this.account,
// name,
// authorization: [],
// data,
// })
async call(
name: NameType,
data: ABISerializableObject | {[key: string]: any},
session: Session
): Promise<TransactResult> {
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})
}
}

0 comments on commit 2f5d3f5

Please sign in to comment.