@@ -849,7 +849,7 @@ class EarnTest<V extends Variant = Variant.New> {
849849 case Variant . New :
850850 await this . earn . methods
851851 . initialize ( initialIndex ! )
852- . accounts ( {
852+ . accountsPartial ( {
853853 admin : this . admin . publicKey ,
854854 mMint : this . mMint . publicKey ,
855855 } )
@@ -862,6 +862,7 @@ class EarnTest<V extends Variant = Variant.New> {
862862 . accounts ( {
863863 admin : this . admin . publicKey ,
864864 mMint : this . mMint . publicKey ,
865+ oldMMint : this . oldMMint ! . publicKey ,
865866 } )
866867 . signers ( [ this . admin ] )
867868 . rpc ( ) ;
@@ -979,6 +980,7 @@ for (const variant of VARIANTS) {
979980 . accounts ( {
980981 admin : $ . admin . publicKey ,
981982 mMint : $ . mMint . publicKey ,
983+ oldMMint : $ . oldMMint ! . publicKey ,
982984 } )
983985 . signers ( [ $ . admin ] )
984986 . rpc ( ) ,
@@ -987,7 +989,7 @@ for (const variant of VARIANTS) {
987989 await $ . expectSystemError (
988990 $ . earn . methods
989991 . initialize ( initialIndex )
990- . accounts ( {
992+ . accountsPartial ( {
991993 admin : $ . admin . publicKey ,
992994 mMint : $ . mMint . publicKey ,
993995 } )
@@ -1013,6 +1015,7 @@ for (const variant of VARIANTS) {
10131015 admin : $ . admin . publicKey ,
10141016 mMint : $ . mMint . publicKey ,
10151017 globalAccount : wrongGlobalAccount ,
1018+ oldMMint : $ . oldMMint ! . publicKey ,
10161019 } )
10171020 . signers ( [ $ . admin ] )
10181021 . rpc ( ) ,
@@ -1046,6 +1049,7 @@ for (const variant of VARIANTS) {
10461049 . accountsPartial ( {
10471050 admin : $ . admin . publicKey ,
10481051 mMint : wrongMint . publicKey ,
1052+ oldMMint : $ . oldMMint ! . publicKey ,
10491053 tokenProgram : TOKEN_PROGRAM_ID ,
10501054 } )
10511055 . signers ( [ $ . admin ] )
@@ -1083,6 +1087,7 @@ for (const variant of VARIANTS) {
10831087 . accountsPartial ( {
10841088 admin : $ . admin . publicKey ,
10851089 mMint : $ . mMint . publicKey ,
1090+ oldMMint : $ . oldMMint ! . publicKey ,
10861091 portalTokenAuthority : wrongPortalAuthority ,
10871092 } )
10881093 . signers ( [ $ . admin ] )
@@ -1119,6 +1124,7 @@ for (const variant of VARIANTS) {
11191124 . accountsPartial ( {
11201125 admin : $ . admin . publicKey ,
11211126 mMint : $ . mMint . publicKey ,
1127+ oldMMint : $ . oldMMint ! . publicKey ,
11221128 extSwapGlobal : wrongExtSwapGlobal ,
11231129 } )
11241130 . signers ( [ $ . admin ] )
@@ -1153,6 +1159,7 @@ for (const variant of VARIANTS) {
11531159 . accountsPartial ( {
11541160 admin : $ . admin . publicKey ,
11551161 mMint : wrongMint . publicKey ,
1162+ oldMMint : $ . oldMMint ! . publicKey ,
11561163 } )
11571164 . signers ( [ $ . admin ] )
11581165 . rpc ( ) ,
@@ -1187,6 +1194,7 @@ for (const variant of VARIANTS) {
11871194 . accountsPartial ( {
11881195 admin : $ . admin . publicKey ,
11891196 mMint : wrongMint . publicKey ,
1197+ oldMMint : $ . oldMMint ! . publicKey ,
11901198 } )
11911199 . signers ( [ $ . admin ] )
11921200 . rpc ( ) ,
@@ -1220,6 +1228,7 @@ for (const variant of VARIANTS) {
12201228 . accountsPartial ( {
12211229 admin : $ . admin . publicKey ,
12221230 mMint : mint . publicKey ,
1231+ oldMMint : $ . oldMMint ! . publicKey ,
12231232 } )
12241233 . signers ( [ $ . admin ] )
12251234 . rpc ( ) ,
@@ -1258,6 +1267,10 @@ for (const variant of VARIANTS) {
12581267 // migrate test cases
12591268 // [X] given the old global account does not match the seed + program ID
12601269 // [X] it reverts with a constraint seed error
1270+ // [ ] given the new m mint doesn't have the same decimals as the old one
1271+ // [ ] it reverts with a mint decimals error
1272+ // [ ] given the effective supply of the new mint is greater than than the supply of the old mint
1273+ // [ ] it reverts with an invalid mint error
12611274 // [X] given all the accounts are correct
12621275 // [X] the global account is created
12631276 // [X] the admin is set to the signer
@@ -1289,6 +1302,7 @@ for (const variant of VARIANTS) {
12891302 . accountsPartial ( {
12901303 admin : $ . admin . publicKey ,
12911304 mMint : $ . mMint . publicKey ,
1305+ oldMMint : $ . oldMMint ! . publicKey ,
12921306 oldGlobalAccount : wrongGlobalAccount ,
12931307 } )
12941308 . signers ( [ $ . admin ] )
@@ -1310,14 +1324,15 @@ for (const variant of VARIANTS) {
13101324 . accounts ( {
13111325 admin : $ . admin . publicKey ,
13121326 mMint : $ . mMint . publicKey ,
1327+ oldMMint : $ . oldMMint ! . publicKey ,
13131328 } )
13141329 . signers ( [ $ . admin ] )
13151330 . rpc ( ) ;
13161331 } else {
13171332 // Create and send the transaction
13181333 await $ . earn . methods
13191334 . initialize ( initialIndex )
1320- . accounts ( {
1335+ . accountsPartial ( {
13211336 admin : $ . admin . publicKey ,
13221337 mMint : $ . mMint . publicKey ,
13231338 } )
0 commit comments