feat: start claim creation based on extracted data from injection
feat: start claim creation based on extracted data from injection
Tested on this provider: 8ebda519-490f-4ee6-9e38-0f20ce37acf9
Modified the custom injection to the following:
if (window.location.href === 'https://www.coingecko.com/en/nft') {
setInterval(() => {
try {
// Check if the window.injected flag is true then we've already injected
if (window.injected) {
return;
}
alert('window.injected is: ' + window.injected);
const rd = {
url: 'https://api.coingecko.com/api/v3/global',
cookies: '',
headers: {
"Content-Type": "application/json",
},
method: 'GET',
requestBody: 'https://api.coingecko.com/api/v3/global',
responseBody: 'response',
extractedParams: {
"active_cryptocurrencies": "14682"
},
responseSelections: window.payloadData.responseSelections,
geoLocation: window.payloadData.geoLocation,
responseRedactions: window.payloadData.responseSelections.map((i)=>({"xPath":i.xPath,"jsonPath":i.jsonPath})),
responseMatches: window.payloadData.responseSelections.map((i)=>{
return {"value":i.responseMatch,"type":"regex"}
}),
witnessParameters: {...window.payloadData.parameters}
}
if (window.flutter_inappwebview && window.flutter_inappwebview.callHandler) {
window.flutter_inappwebview.callHandler("extractedData", JSON.stringify(rd));
}
alert('injected');
window.injected = true;
} catch (e) {
alert(e);
}
}, 1000);
}
Edited by Karam Shbeb