feat(env): add mock ordinal check setting for dev environment

Signed-off-by: Ashis Kumar Naik <ashishami2002@gmail.com>
This commit is contained in:
Ashis Kumar Naik 2025-06-20 04:26:43 +05:30
parent 7d278d6fc2
commit e29ad8df9f
2 changed files with 10 additions and 10 deletions

2
.env.example Normal file
View File

@ -0,0 +1,2 @@
# Mock/bypass settings for development
VITE_OPCHAN_MOCK_ORDINAL_CHECK=false

View File

@ -10,16 +10,14 @@ export class OrdinalAPI {
*/
async getOperatorDetails(address: string): Promise<OrdinalApiResponse> {
// Optionally Uncomment to bypass verification in development mode
// if (process.env.NODE_ENV === 'development') {
// console.log(`[DEV] Bypassing ordinal verification for address: ${address}`);
// return {
// has_operators: true,
// error_message: '',
// data: []
// };
// }
if (import.meta.env.VITE_OPCHAN_MOCK_ORDINAL_CHECK === 'true') {
console.log(`[DEV] Bypassing ordinal verification for address: ${address}`);
return {
has_operators: true,
error_message: '',
data: []
};
}
const url = `${BASE_URL}/${address}/detail/`;