diff --git a/apps/circuit-compiler/src/app/components/container.tsx b/apps/circuit-compiler/src/app/components/container.tsx index 51f583293c..d56036e44d 100644 --- a/apps/circuit-compiler/src/app/components/container.tsx +++ b/apps/circuit-compiler/src/app/components/container.tsx @@ -15,9 +15,17 @@ import { PrimeValue } from '../types' export function Container () { const circuitApp = useContext(CircuitAppContext) - const showCompilerLicense = (message = 'License not available') => { - // @ts-ignore - circuitApp.plugin.call('notification', 'modal', { id: 'modal_circuit_compiler_license', title: 'Compiler License', message }) + const showCompilerLicense = async (message = 'License not available') => { + try { + const response = await fetch('https://raw.githubusercontent.com/iden3/circom/master/COPYING') + if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`) + const content = await response.text() + // @ts-ignore + circuitApp.plugin.call('notification', 'modal', { id: 'modal_circuit_compiler_license', title: 'Compiler License', message: content }) + } catch (e) { + // @ts-ignore + circuitApp.plugin.call('notification', 'modal', { id: 'modal_circuit_compiler_license', title: 'Compiler License', message }) + } } const handleVersionSelect = (version: string) => { @@ -53,11 +61,16 @@ export function Container () {
-