KomodoPlatform / komodo-wallet-desktop

Komodo Wallet Desktop GUI
https://atomicdex.io
GNU General Public License v2.0
237 stars 201 forks source link

[FEATURE REQUEST]: Modern Addressbook #534

Closed Milerius closed 3 years ago

Milerius commented 3 years ago

Is your feature request related to a problem? Please describe.

Not really a problem, but a bad user experience, the redesign of this feature will allow us to be sustainable and have something scalable.

Describe the solution you'd like

An address book with 0(1) writing and reading, sortable by name and categorizable.

Example of a valid json data for addressbook:

{

  "Milerius": 
  {
    "categories": ["Friend"],
    "address_book": {
      "smart_chain": "RX43484BFZbfQiaaRZXDqskHQhwyCKwBk2",
      "erc_20": "0xA00bF635b2cD52F2b6B4D8cd9B9efd290B97838C",
      "qrc_20": "QiNq5uTbqCfumrJQNirasdCi9hS5hAzRyp",
      "BTC": "a_btc_address"
    }
  },

  "Alice":
  {
    "categories": ["Pro", "RH", "Salary Provider"],
    "address_book": {
      "smart_chain": "a_smart_chain_address",
      "BTC": "a_btc_address"
    }
  }
}

Picking from this format is very easy:

my_transaction transaction; //! a KMD transaction
 for (auto&& cur_contact : my_json_object) {
    if (cur_contact.at("address_book").contains(transaction.coin.type)) {
        //! Send a notification with categories and the contact name, the front end will determine the notification
       //! For example if the contact is Alice and one of the categories is `Salary Provider` then the notification will be something like "Alice send you your salary: Total: 500 KMD (250 €)"
     //! If the contact is Milerius and one of the categories is `Friend` then your notification will be smth like: `You received 500 KMD (250 €) from your friend Milerius`
    }     
 }

Requirements:

Usefull links:

Development step:

naezith commented 3 years ago

It would be great if you can provide a visual mockup.

Milerius commented 3 years ago

It would be great if you can provide a visual mockup.

Will try to provide that if i have some times this week, we can inspire from what we have now

ghost commented 3 years ago

The persistent data format of an address book is now formatted as followed:

"addressbook_contacts":
[
    {
        "name": "syl",
        "categories": ["Developer", "C++ lover"],
        "wallets_info":
        [
            {
                "type": "BTC",
                "addresses": { "Wallet of home computer": "some address", "Binance wallet": "another address" }
            },
            {
                "type": "erc-20",
                "addresses": { "My valid erc-20 address": "erc20 address" }
            }
        ]
    },
    {
        "name": "Daxter",
        "categories": ["Friend"],
        "wallets_info":
        [
            {
                "type": "ETH",
                "addresses": { "My eth wallet": "An eth waddress" }
            },
            {
                "type": "BTC",
                "addresses": { "My btc wallet": "A btc address" }
            }
        ]
    }
]
Milerius commented 3 years ago

Implemented in #599