@@ -278,20 +278,8 @@ export const claimRewards = async (wallet, connection, userPublicKey, options =
278278 }
279279
280280 if ( ! web3 || ! PublicKey ) {
281- // Mock implementation for test environment with enhanced cooldown
282- return new Promise ( ( resolve , reject ) => {
283- setTimeout ( ( ) => {
284- // Simulate 10% chance of failure for demonstration
285- if ( Math . random ( ) < 0.1 ) {
286- setFailedClaimCooldown ( userPublicKey ) ;
287- reject ( new Error ( 'Simulated transaction failure: Network congestion' ) ) ;
288- } else {
289- // Set cooldown for successful mock claim
290- setClaimCooldown ( userPublicKey ) ;
291- resolve ( 'mock_transaction_signature_' + Date . now ( ) ) ;
292- }
293- } , 2000 ) ;
294- } ) ;
281+ // Real blockchain environment required - no mock data
282+ throw new Error ( 'Web3 connection required for claiming rewards' ) ;
295283 }
296284
297285 const operation = async ( ) => {
@@ -354,8 +342,8 @@ export const createUserRewardsAccount = async (wallet, connection, userPublicKey
354342 const { retryConfig = { } } = options ;
355343
356344 if ( ! web3 || ! PublicKey ) {
357- // Mock implementation
358- return Promise . resolve ( 'mock_create_account_signature_' + Date . now ( ) ) ;
345+ // Real blockchain environment required - no mock data
346+ throw new Error ( 'Web3 connection required for creating user rewards account' ) ;
359347 }
360348
361349 const operation = async ( ) => {
@@ -409,8 +397,8 @@ export const hasUserRewardsAccount = async (
409397 const { retryConfig = { } } = options ;
410398
411399 if ( ! web3 || ! PublicKey ) {
412- // Mock implementation - randomly return true/false
413- return Math . random ( ) > 0.5 ;
400+ // Real blockchain environment required - no mock data
401+ throw new Error ( 'Web3 connection required for checking user rewards account' ) ;
414402 }
415403
416404 const operation = async ( ) => {
0 commit comments