feat: get default public key from vscode
This commit is contained in:
		@@ -103,7 +103,6 @@ header("Allow: GET, POST, OPTIONS, PUT, DELETE");
 | 
			
		||||
                    // set user token to vscode global state
 | 
			
		||||
                    await biCommunication2Vscode('setUserToken', jsonData.data)
 | 
			
		||||
                    .then((data) => {
 | 
			
		||||
                        console.log(data)
 | 
			
		||||
                        var iframe = document.getElementById('embedded-devstar');
 | 
			
		||||
                        if (iframe && iframe.contentWindow) {
 | 
			
		||||
                            iframe.contentWindow.postMessage({ action: 'setUserToken', data: data}, '*');
 | 
			
		||||
@@ -114,6 +113,12 @@ header("Allow: GET, POST, OPTIONS, PUT, DELETE");
 | 
			
		||||
                            iframe.contentWindow.postMessage({ action: 'setUserToken', data: {ok: false}}, '*');
 | 
			
		||||
                        }
 | 
			
		||||
                    });
 | 
			
		||||
                } else if (jsonData.action === 'getDefaultPublicKey') {
 | 
			
		||||
                    const data = await biCommunication2Vscode('getDefaultPublicKey', {})
 | 
			
		||||
                    var iframe = document.getElementById('embedded-devstar')
 | 
			
		||||
                    if (iframe && iframe.contentWindow) {
 | 
			
		||||
                        iframe.contentWindow.postMessage({ action: 'getDefaultPublicKey', data: data}, "*")
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            } catch (error) {
 | 
			
		||||
                console.error('Error parsing message:', error);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user