Skip to content

Commit

Permalink
Merge pull request #184 from KeystoneHQ/feat/avax
Browse files Browse the repository at this point in the history
Feat/avax
  • Loading branch information
soralit authored Jan 24, 2025
2 parents 7f62721 + 938b899 commit b0b7ef7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/ur-registry-avalanche/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@keystonehq/bc-ur-registry-avalanche",
"version": "0.0.4",
"version": "0.0.5",
"description": "bc-ur-registry extension for Avalanche",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
15 changes: 11 additions & 4 deletions packages/ur-registry-avalanche/src/AvalancheSignRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,20 @@ export class AvalancheSignRequest extends RegistryItem {
mfp: string,
xpub: string,
walletIndex: number,
uuidString?: string
requestId?: string | Buffer
) {
let _requestId;
if (typeof requestId === "string") {
_requestId = Buffer.from(uuid.parse(requestId) as Uint8Array);
} else if (requestId instanceof Buffer) {
_requestId = requestId;
} else {
_requestId = Buffer.from(uuid.parse(uuid.v4()));
}

return new AvalancheSignRequest({
data,
requestId: uuidString
? Buffer.from(uuid.parse(uuidString) as Uint8Array)
: undefined,
requestId: _requestId,
mfp: Buffer.from(mfp, "hex"),
xpub,
walletIndex,
Expand Down

0 comments on commit b0b7ef7

Please sign in to comment.