Skip to content

Commit

Permalink
chore: update dependencies and fix name-related logic (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
thephez authored Aug 14, 2024
1 parent aec1c41 commit 6a92bbd
Show file tree
Hide file tree
Showing 6 changed files with 167 additions and 157 deletions.
2 changes: 1 addition & 1 deletion 1-Identities-and-Names/identity-topup.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = setupDashClient();

const topupIdentity = async () => {
const identityId = process.env.IDENTITY_ID; // Your identity ID
const topUpAmount = 100000; // Number of duffs
const topUpAmount = 300000; // Number of duffs

await client.platform.identities.topUp(identityId, topUpAmount);
return client.platform.identities.get(identityId);
Expand Down
2 changes: 1 addition & 1 deletion 1-Identities-and-Names/identity-update-disable-key.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = setupDashClient();

const updateIdentityDisableKey = async () => {
const identityId = process.env.IDENTITY_ID;
const keyId = 3; // One of the identity's public key IDs
const keyId = 4; // One of the identity's public key IDs

// Retrieve the identity to be updated and the public key to disable
const existingIdentity = await client.platform.identities.get(identityId);
Expand Down
2 changes: 1 addition & 1 deletion 1-Identities-and-Names/name-register.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const registerName = async () => {
const identity = await platform.identities.get(process.env.IDENTITY_ID); // Your identity ID
const nameRegistration = await platform.names.register(
`${nameToRegister}.dash`,
{ dashUniqueIdentityId: identity.getId() },
{ identity: identity.getId() },
identity,
);

Expand Down
2 changes: 1 addition & 1 deletion 1-Identities-and-Names/name-resolve-by-record.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const client = setupDashClient();
const retrieveNameByRecord = async () => {
// Retrieve by a name's identity ID
return client.platform.names.resolveByRecord(
'dashUniqueIdentityId',
'identity',
process.env.IDENTITY_ID, // Your identity ID
);
};
Expand Down
Loading

0 comments on commit 6a92bbd

Please sign in to comment.