[FIX] remove unused code

Remove code  that not used.
Also remove global veriable, introduced by this code
Also there was error when using custom currency (one not in 'currencies_all_keyed' map)
Merge pull request #1787 from darkdarkdragon/develop-fix-trust-1

[FIX] removed unused code