File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change
1
+ package swap_validator
2
+
3
+ import (
4
+ "testing"
5
+
6
+ "github.com/mr-tron/base58"
7
+ "github.com/stretchr/testify/assert"
8
+ "github.com/stretchr/testify/require"
9
+ )
10
+
11
+ // Tests based on account created here https://solscan.io/tx/4kXywqQRqJXRnm8mzAVRYkL1YVwyAEi8rVVNzRYG3AAu73xqjxNdHKX6LgoFhon66ZWHJ8HU3QkAmiot7AGzXPzd
12
+
13
+ func TestPreSwapStateAddress (t * testing.T ) {
14
+ address , _ , err := GetPreSwapStateAddress (& GetPreSwapStateAddressArgs {
15
+ Source : mustBase58Decode ("5nNBW1KhzHVbR4NMPLYPRYj3UN5vgiw5GrtpdK6eGoce" ),
16
+ Destination : mustBase58Decode ("9Rgx4kjnYZBbeXXgbbYLT2FfgzrNHFUShDtp8dpHHjd2" ),
17
+ Nonce : mustBase58Decode ("3SVPEF5HDcKLhVfKeAnbH5Azpyeuk2yyVjEjZbz4VhrL" ),
18
+ })
19
+ require .NoError (t , err )
20
+ assert .Equal (t , "Hh338LHJhkzPbDisGt5Lge8qkgc3RExvH7BdmKgnRQw9" , base58 .Encode (address ))
21
+ }
You can’t perform that action at this time.
0 commit comments