Skip to content

Commit

Permalink
Renamed ActionData to ActionDataType
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroncox committed Aug 10, 2023
1 parent 8fb3077 commit 43ab23a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ export interface ActionOptions {
authorization?: PermissionLevelType[]
}

export type ActionData = BytesType | ABISerializableObject | Record<string, any>
export type ActionDataType = BytesType | ABISerializableObject | Record<string, any>

export type ActionConstructor = (data: ActionData, options?: ActionOptions) => Action
export type ActionConstructor = (data: ActionDataType, options?: ActionOptions) => Action

export interface ActionsArgs {
name: NameType
data: ActionData
data: ActionDataType
authorization?: PermissionLevelType[]
}

Expand Down Expand Up @@ -99,7 +99,7 @@ export class Contract {
throw new Error(`Contract (${this.account}) does not have an action named (${name})`)
}

return (data: ActionData, options?: ActionOptions) => {
return (data: ActionDataType, options?: ActionOptions) => {
let authorization = [PlaceholderAuth]
if (options && options.authorization) {
authorization = options.authorization.map((auth) => PermissionLevel.from(auth))
Expand Down
6 changes: 3 additions & 3 deletions test/tests/contract.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {assert} from 'chai'
import {makeClient, mockPrivateKey, mockSession} from '@wharfkit/mock-data'

import ContractKit, {ActionData, Contract, ContractArgs, Table} from '$lib'
import {ABI, Action, Asset, Name, NameType, PrivateKey, Serializer} from '@wharfkit/antelope'
import ContractKit, {ActionDataType, Contract, ContractArgs, Table} from '$lib'
import {ABI, Action, Asset, Name, PrivateKey, Serializer} from '@wharfkit/antelope'
import {PlaceholderAuth} from '@wharfkit/signing-request'
import {ProducerInfo} from '$test/data/structs/eosio'

Expand Down Expand Up @@ -69,7 +69,7 @@ const transferData = {
}

// Mocks data for the first action defined in the contract for testing purposes
function getMockParams(contract: Contract): ActionData {
function getMockParams(contract: Contract): ActionDataType {
switch (String(contract.account)) {
case 'eosio': {
return {
Expand Down

0 comments on commit 43ab23a

Please sign in to comment.