Skip to content

Commit c0d2ae7

Browse files
committed
revert: put initial test back in
1 parent 8157b8a commit c0d2ae7

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

test/tests/index.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import {strict as assert} from 'assert'
22

3-
import {Asset} from '@wharfkit/antelope'
3+
import {Asset, Serializer} from '@wharfkit/antelope'
44
import {makeClient} from '@wharfkit/mock-data'
55

6+
import * as SystemTokenContract from '../../src/contracts/system.token'
7+
68
const apiClient = makeClient('https://eos.greymass.com')
79

810
import {Token} from '../../src'
@@ -60,10 +62,14 @@ suite('Token', function () {
6062

6163
assert.equal(String(action.account), 'eosio.token')
6264
assert.equal(String(action.name), 'transfer')
63-
assert.equal(
64-
action.data.hexString,
65-
'80b1915e5d268dca80b1915e5d268dca903300000000000004454f53000000000e7468697320697320612074657374'
66-
)
65+
const decoded = Serializer.decode({
66+
data: action.data,
67+
type: SystemTokenContract.Types.transfer,
68+
})
69+
assert.equal(String(decoded.from), 'teamgreymass')
70+
assert.equal(String(decoded.to), 'teamgreymass')
71+
assert.equal(String(decoded.quantity), '1.3200 EOS')
72+
assert.equal(String(decoded.memo), 'this is a test')
6773
})
6874
})
6975
})

0 commit comments

Comments
 (0)