Skip to content
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

Fix getRegistrant #116

Merged
merged 1 commit into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/nkn.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ class Client {

let addr = dest.split('.');

if (addr[addr.length - 1].length < common.key.publicKeyLength * 2) {
if (addr[addr.length - 1].length < common.crypto.publicKeyLength * 2) {
let res = await this.getRegistrant(addr[addr.length - 1]);

if (res.registrant && res.registrant.length > 0) {
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset='utf-8'>
<title>nkn-sdk 1.2.8 | Documentation</title>
<title>nkn-sdk 1.2.9 | Documentation</title>
<meta name='description' content='NKN client and wallet SDK'>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<link href='assets/bass.css' rel='stylesheet'>
Expand All @@ -15,7 +15,7 @@
<div id='split-left' class='overflow-auto fs0 height-viewport-100'>
<div class='py1 px2'>
<h3 class='mb0 no-anchor'>nkn-sdk</h3>
<div class='mb1'><code>1.2.8</code></div>
<div class='mb1'><code>1.2.9</code></div>
<input
placeholder='Filter'
id='filter-input'
Expand Down
2 changes: 1 addition & 1 deletion lib/client/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ class Client {

let addr = dest.split('.');

if (addr[addr.length - 1].length < common.key.publicKeyLength * 2) {
if (addr[addr.length - 1].length < common.crypto.publicKeyLength * 2) {
let res = await this.getRegistrant(addr[addr.length - 1]);

if (res.registrant && res.registrant.length > 0) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nkn-sdk",
"version": "1.2.8",
"version": "1.2.9",
"description": "NKN client and wallet SDK",
"main": "lib/index.js",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion src/client/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export default class Client {
throw new common.errors.InvalidDestinationError('destination is empty');
}
let addr = dest.split('.');
if (addr[addr.length - 1].length < common.key.publicKeyLength * 2) {
if (addr[addr.length - 1].length < common.crypto.publicKeyLength * 2) {
let res = await this.getRegistrant(addr[addr.length - 1]);
if (res.registrant && res.registrant.length > 0) {
addr[addr.length - 1] = res.registrant;
Expand Down