!1 add attestkey api

Merge pull request !1 from CheungVane/temp
This commit is contained in:
CheungVane 2022-08-08 02:19:08 +00:00 committed by Gitee
commit b9f26cfaea
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -527,6 +527,18 @@ export function mockHuks() {
})
}
},
attestKey: function (...args) {
console.warn("huks.attestKey interface mocked in the Previewer. How this interface works on the Previewer" +
" may be different from that on a real device.")
const len = args.length
if (typeof args[len - 1] === 'function') {
args[len - 1].call(this, paramMock.businessErrorMock, HuksResult)
} else {
return new Promise((resolve, reject) => {
resolve(HuksResult)
})
}
},
getSdkVersion: function (...args) {
console.warn("huks.getSdkVersion interface mocked in the Previewer. How this interface works on the Previewer" +
" may be different from that on a real device.")