-
Notifications
You must be signed in to change notification settings - Fork 50
Tokens supply format from plugin #1505
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -16,6 +16,7 @@ import { EsdtType } from "./entities/esdt.type"; | |||||
| import { ElasticIndexerService } from "src/common/indexer/elastic/elastic.indexer.service"; | ||||||
| import { randomUUID } from "crypto"; | ||||||
| import { EsdtSubType } from "./entities/esdt.sub.type"; | ||||||
| import { PluginService } from "../../common/plugins/plugin.service"; | ||||||
|
|
||||||
| @Injectable() | ||||||
| export class EsdtService { | ||||||
|
|
@@ -27,6 +28,7 @@ export class EsdtService { | |||||
| private readonly cachingService: CacheService, | ||||||
| private readonly vmQueryService: VmQueryService, | ||||||
| private readonly indexerService: IndexerService, | ||||||
| private readonly pluginService: PluginService, | ||||||
| @Inject(forwardRef(() => AssetsService)) | ||||||
| private readonly assetsService: AssetsService, | ||||||
| private readonly elasticIndexerService: ElasticIndexerService | ||||||
|
|
@@ -367,7 +369,9 @@ export class EsdtService { | |||||
| } | ||||||
|
|
||||||
| async getTokenSupply(identifier: string): Promise<EsdtSupply> { | ||||||
| const { supply, minted, burned, initialMinted } = await this.gatewayService.getEsdtSupply(identifier); | ||||||
| const esdtSupply = await this.gatewayService.getEsdtSupply(identifier); | ||||||
| this.pluginService.formatTokenSupply(identifier, esdtSupply); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should not fail if the formatTokenSupply is not defined in the plugin module
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, just tested and it works
|
||||||
| this.pluginService.formatTokenSupply(identifier, esdtSupply); | |
| esdtSupply = this.pluginService.formatTokenSupply(identifier, esdtSupply); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method formatTokenSupply is currently an empty stub. Consider adding a comment or a placeholder implementation (e.g., a NotImplemented error) to clarify its intended behavior.