Skip to content

Commit bfa42a7

Browse files
committed
fix: update token identifiers and progress display in README and source files
1 parent 348c6e5 commit bfa42a7

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ const hash = await wallet.privateHash(data, {
341341
Gets the balance for a specific token.
342342

343343
```typescript
344-
const balance = await wallet.tokenBalance('xU9zFkq3X2ZQ6olwNVvr1vUWIjc3kXTWr7xKQD6dh10')
344+
const balance = await wallet.tokenBalance('7GoQfmSOct_aUOWKM4xbKGg6DzAmOgdKwg8Kf-CbHm4')
345345
// Returns: string (balance as string representation)
346346

347347
// Convert to number if needed
@@ -391,7 +391,7 @@ const tierInfo = await wallet.getWanderTierInfo()
391391
// }
392392

393393
console.log(`Tier: ${tierInfo.tier}`)
394-
console.log(`Progress: ${(tierInfo.progress * 100).toFixed(2)}%`)
394+
console.log(`Progress: ${tierInfo.progress.toFixed(2)}%`)
395395
console.log(`Total Holders: ${tierInfo.totalHolders}`)
396396
```
397397

@@ -573,7 +573,7 @@ async function manageTokens() {
573573
await wallet.connect(['ACCESS_ADDRESS', 'ACCESS_TOKENS'])
574574

575575
// Get token balance
576-
const tokenId = 'xU9zFkq3X2ZQ6olwNVvr1vUWIjc3kXTWr7xKQD6dh10' // $U token
576+
const tokenId = '7GoQfmSOct_aUOWKM4xbKGg6DzAmOgdKwg8Kf-CbHm4' // WNDR token
577577
const balance = await wallet.tokenBalance(tokenId)
578578
console.log(`Balance: ${balance}`)
579579

@@ -589,7 +589,7 @@ async function manageTokens() {
589589
try {
590590
const tierInfo = await wallet.getWanderTierInfo()
591591
console.log(`\n🏆 Wander Tier: ${tierInfo.tier}`)
592-
console.log(` Progress: ${(tierInfo.progress * 100).toFixed(2)}%`)
592+
console.log(` Progress: ${tierInfo.progress.toFixed(2)}%`)
593593
console.log(` Rank: ${tierInfo.rank || 'N/A'}`)
594594
console.log(` Total Holders: ${tierInfo.totalHolders}`)
595595
} catch (error) {

src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ export class NodeArweaveWallet {
470470
*
471471
* @example
472472
* ```typescript
473-
* await wallet.addToken('xU9zFkq3X2ZQ6olwNVvr1vUWIjc3kXTWr7xKQD6dh10', 'asset')
473+
* await wallet.addToken('7GoQfmSOct_aUOWKM4xbKGg6DzAmOgdKwg8Kf-CbHm4', 'asset')
474474
* ```
475475
*/
476476
async addToken(id: string, type?: TokenType, gateway?: Gateway): Promise<void> {
@@ -487,7 +487,7 @@ export class NodeArweaveWallet {
487487
*
488488
* @example
489489
* ```typescript
490-
* const isAdded = await wallet.isTokenAdded('xU9zFkq3X2ZQ6olwNVvr1vUWIjc3kXTWr7xKQD6dh10')
490+
* const isAdded = await wallet.isTokenAdded('7GoQfmSOct_aUOWKM4xbKGg6DzAmOgdKwg8Kf-CbHm4')
491491
* console.log('Token added:', isAdded)
492492
* ```
493493
*/
@@ -641,7 +641,7 @@ export class NodeArweaveWallet {
641641
*
642642
* @example
643643
* ```typescript
644-
* const balance = await wallet.tokenBalance('xU9zFkq3X2ZQ6olwNVvr1vUWIjc3kXTWr7xKQD6dh10')
644+
* const balance = await wallet.tokenBalance('7GoQfmSOct_aUOWKM4xbKGg6DzAmOgdKwg8Kf-CbHm4')
645645
* console.log('Token balance:', balance)
646646
* ```
647647
*/
@@ -681,7 +681,7 @@ export class NodeArweaveWallet {
681681
* ```typescript
682682
* const tierInfo = await wallet.getWanderTierInfo()
683683
* console.log(`Tier: ${tierInfo.tier}`)
684-
* console.log(`Progress: ${(tierInfo.progress * 100).toFixed(2)}%`)
684+
* console.log(`Progress: ${tierInfo.progress.toFixed(2)}%`)
685685
* console.log(`Rank: ${tierInfo.rank || 'N/A'}`)
686686
* ```
687687
*/

test/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ describe('nodeArweaveWallet API Methods', () => {
346346

347347
// Validate progress is between 0 and 1
348348
expect(tierInfo.progress).toBeGreaterThanOrEqual(0)
349-
expect(tierInfo.progress).toBeLessThanOrEqual(1)
349+
expect(tierInfo.progress).toBeLessThanOrEqual(100)
350350
} catch (error: any) {
351351
// API might not be supported by the wallet
352352
expect(error.message).toContain('not supported')

0 commit comments

Comments
 (0)