fix addon certifier thing

This commit is contained in:
Jean Ouina 2020-06-28 19:08:47 +02:00
parent b592c7162d
commit 995824fcd5
3 changed files with 10 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@ -119,7 +119,7 @@ export function checkHash(hash, data, filename, resultCallback, removeCallback){
} }
} }
export function processFile(__path, resultCallback, removeCallback){ export function processFile(__path, resultCallback, removeCallback = () => {}){
const hash = crypto.createHash("sha256") const hash = crypto.createHash("sha256")
let data = Buffer.alloc(0) let data = Buffer.alloc(0)
@ -131,6 +131,8 @@ export function processFile(__path, resultCallback, removeCallback){
hashToUrl[hashResult] = __path hashToUrl[hashResult] = __path
console.log(arguments)
checkHash(hashResult, data, basename(__path), resultCallback, removeCallback) checkHash(hashResult, data, basename(__path), resultCallback, removeCallback)
}) })
} }

View File

@ -197,8 +197,8 @@ export default class V2C_PluginCard extends BDV2.reactComponent {
if(this.unmounted)return if(this.unmounted)return
this.setState({ this.setState({
isTrusted: !result.suspect isTrusted: !result.suspect
}, () => {}) })
}) }, () => {})
}else{ }else{
if(this.state.isTrusted){ if(this.state.isTrusted){
style.borderColor = "#4087ed" style.borderColor = "#4087ed"