File tree Expand file tree Collapse file tree
@shared/helpers/__tests__ Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ import {
2121const XLM_CODED_ISSUER =
2222 "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN" ;
2323
24- // The published native SAC addresses. Pinned rather than re-derived, so these
25- // tests also assert that deriving from the passphrase reproduces the values
26- // getNativeContractDetails hardcodes before Task 8 removes them .
24+ // The published native SAC addresses, pinned rather than re-derived, so these
25+ // tests assert that deriving from the passphrase reproduces the known-good
26+ // values rather than just agreeing with themselves .
2727const NATIVE_SAC_PUBLIC =
2828 "CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA" ;
2929const NATIVE_SAC_TESTNET =
@@ -130,7 +130,7 @@ describe("getNativeContractId", () => {
130130 expect ( getNativeContractId ( Networks . TESTNET ) ) . toBe ( NATIVE_SAC_TESTNET ) ;
131131 } ) ;
132132
133- it ( "returns a real address on a network the old lookup table omitted " , ( ) => {
133+ it ( "derives a distinct address on FUTURENET " , ( ) => {
134134 const futurenet = getNativeContractId ( Networks . FUTURENET ) ;
135135 expect ( futurenet ) . toMatch ( / ^ C [ A - Z 2 - 7 ] { 55 } $ / ) ;
136136 expect ( futurenet ) . not . toBe ( NATIVE_SAC_PUBLIC ) ;
Original file line number Diff line number Diff line change @@ -81,10 +81,9 @@ describe("searchAsset", () => {
8181 org : "" ,
8282 } ) ;
8383 } ) ;
84- it ( "should derive getNativeContractDetails for a network the table doesn't cover" , ( ) => {
85- // The contract address is now derived from the passphrase rather than
86- // read from a table, so a network outside PUBLIC/TESTNET gets a real
87- // address instead of the empty string the table used to fall back to.
84+ it ( "derives the native contract address on FUTURENET" , ( ) => {
85+ // The contract address is derived from the network passphrase, so every
86+ // network gets a real address.
8887 expect (
8988 SearchAsset . getNativeContractDetails ( {
9089 network : "FUTURENET" ,
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ describe("getNativeContractDetails", () => {
5757 ) . toBe ( "CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA" ) ;
5858 } ) ;
5959
60- it ( "returns a contract address on a network the table omitted " , ( ) => {
60+ it ( "returns a derived contract address on FUTURENET " , ( ) => {
6161 expect (
6262 getNativeContractDetails ( {
6363 network : "FUTURENET" ,
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const futurenetDetails = {
99} as NetworkDetails ;
1010
1111describe ( "isAssetSac" , ( ) => {
12- it ( "recognises the native contract on a network the old table omitted " , ( ) => {
12+ it ( "recognises the native contract on FUTURENET " , ( ) => {
1313 expect (
1414 isAssetSac ( {
1515 asset : {
You can’t perform that action at this time.
0 commit comments