Skip to content

Allow to switch between DUğ1 and Ğ1

Quoting: Maaltir

As the DUğ1 is the basis of the free currency Ğ1, it seems to me essential to be able to use this unit for displaying prices and payments in free currency. Without this functionality, an application does not seem to me fully usable.

Quoting: @pokapow

yes @vjrj you have the method getCurrentUd() in Durt to get the current UD value: test/gva_test.dart · master · pokapow / durt · GitLab

query {
  currentUd {
    amount
  }
}

By default the result of this query is in ğ1 cents, Durt converts it to ğ1. You just have to multiply the values in G1 everywere in your app by this result to get the values in DU/G1. Same thing for UD transaction, just multiply g1 amount with UD value to make the transaction in UD mode. This is relativity 

Edited by vjrj