File tree 1 file changed +11
-5
lines changed
1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 1
1
import { strict as assert } from 'assert'
2
2
3
- import { Asset } from '@wharfkit/antelope'
3
+ import { Asset , Serializer } from '@wharfkit/antelope'
4
4
import { makeClient } from '@wharfkit/mock-data'
5
5
6
+ import * as SystemTokenContract from '../../src/contracts/system.token'
7
+
6
8
const apiClient = makeClient ( 'https://eos.greymass.com' )
7
9
8
10
import { Token } from '../../src'
@@ -60,10 +62,14 @@ suite('Token', function () {
60
62
61
63
assert . equal ( String ( action . account ) , 'eosio.token' )
62
64
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' )
67
73
} )
68
74
} )
69
75
} )
You can’t perform that action at this time.
0 commit comments