-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/webusb eth #25
base: master
Are you sure you want to change the base?
Conversation
src/hw-app-eth/Eth.ts
Outdated
continue | ||
} | ||
} | ||
const v = (rec_id + 27).toString(16); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
signature 转成 rsv 如果抽象出一个函数,上面和这里就可以重用了。
message_to_sign = Buffer.from(message, "ascii"); | ||
} | ||
let data | ||
if (isPersonalSign) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以看看别的 API 是如何实现的, tcx 内部确实这么实现的,但是给到上层 API, personalSign 和 signMessage 应该也是区分开的。
src/hw-app-eth/Eth.ts
Outdated
} | ||
} | ||
|
||
function bindSignature(data: Buffer) :Buffer{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这部分代码删除吧。
src/hw-transport-webusb/webusb.ts
Outdated
// const deviceModel = devicesList.find(d => d.id === productId); | ||
// return deviceModel; | ||
// }; | ||
export async function requestimkeyDevice(): Promise<any> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在驼峰写法中可以考虑将 imKey 写作 ImKey 例如这里写作 requestImKeyDevice
src/index.ts
Outdated
} else { | ||
return num.toString(); | ||
} | ||
} | ||
|
||
export async function test33(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index.ts 已经是正式的库文件代码了。这些没用的函数都删掉吧。
…/webusb-eth # Conflicts: # src/demo.ts # src/hw-transport-mocker/RecordStore.ts
…to feature/webusb-eth
Refactor/webusb eth
No description provided.