Skip to content

Commit

Permalink
fix method namings
Browse files Browse the repository at this point in the history
  • Loading branch information
goulinkh committed Jun 24, 2024
1 parent fded482 commit 3fd3984
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/services/dot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ export class DotService extends SubstrateService {
}

mainToPlanck(amount: string): string {
return this.mainToPlanck(amount);
return this.dotToPlanck(amount);
}

/**
* Convert DOT planck to main
* Convert DOT to planck
* @param amountDot amount in planck
*/
planckToMain(amountDot: string): string {
dotToPlanck(amountDot: string): string {
return parseUnits(amountDot, 10).toString();
}
}
6 changes: 3 additions & 3 deletions src/services/ksm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ export class KsmService extends SubstrateService {
}

mainToPlanck(amount: string): string {
return this.mainToPlanck(amount);
return this.ksmToPlanck(amount);
}

/**
* Convert KSM planck to main
* Convert KSM to planck
* @param amountKsm amount in planck
*/
planckToMain(amountKsm: string): string {
ksmToPlanck(amountKsm: string): string {
return parseUnits(amountKsm, 12).toString();
}
}

0 comments on commit 3fd3984

Please sign in to comment.