@sudobility/contracts 1.10.1 → 1.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sudobility/contracts",
3
- "version": "1.10.1",
3
+ "version": "1.10.2",
4
4
  "type": "module",
5
5
  "main": "dist/unified-esm/src/unified/index.js",
6
6
  "module": "dist/unified-esm/src/unified/index.js",
@@ -11,6 +11,11 @@
11
11
  "require": "./dist/unified/src/unified/index.js",
12
12
  "types": "./dist/unified/src/unified/index.d.ts"
13
13
  },
14
+ "./evm": {
15
+ "import": "./dist/unified-esm/src/evm/index.js",
16
+ "require": "./dist/unified/src/evm/index.js",
17
+ "types": "./dist/unified/src/evm/index.d.ts"
18
+ },
14
19
  "./react": {
15
20
  "import": "./dist/unified-esm/src/react/index.js",
16
21
  "require": "./dist/unified/src/react/index.js",
@@ -980,10 +980,14 @@ async fn test_claim_expired_shares_moves_funds_to_owner() {
980
980
  .process_transaction(transaction)
981
981
  .await
982
982
  .unwrap();
983
- recent_blockhash = context.banks_client.get_latest_blockhash().await.unwrap();
984
983
 
985
- // Warp forward so the claim expires (claim period is 60 days)
986
- context.warp_to_slot(20_000_000).unwrap();
984
+ // Warp forward so the claim expires (claim period is 60 days = 5,184,000 seconds)
985
+ // Manually set the clock to a future timestamp beyond the claim period
986
+ use solana_sdk::clock::Clock;
987
+ let mut clock = context.banks_client.get_sysvar::<Clock>().await.unwrap();
988
+ clock.unix_timestamp += 60 * 24 * 60 * 60 + 1; // 60 days + 1 second
989
+ context.set_sysvar(&clock);
990
+
987
991
  recent_blockhash = context.banks_client.get_latest_blockhash().await.unwrap();
988
992
 
989
993
  // Owner reclaims expired shares