enkryptcom / enKrypt

Enkrypt: Ethereum, Polkadot and Web3 Wallet
https://www.enkrypt.com/
MIT License
283 stars 153 forks source link

fix: kadena: Activity: missing sender/receiver for cross chain transfers #388

Closed Takadenoshi closed 5 months ago

Takadenoshi commented 5 months ago

This PR fixes an issue with the Activity view of Kadena accounts that have sent of received (chainweb) cross-chain transfers

Before: 1706633235

After:

1706633563

Takadenoshi commented 5 months ago

~Draft because TODO:~

[x] Activity.rawInfo is incorrectly typed for Kadena

The activity structure we get back from a DB looks like this:

  {
    "amount": "50.0",
    "blockHash": "B958BmmyXf3qOcpYKKDVtr5ris5mPsNSXb6JWQNEZvA",
    "blockTime": "2024-01-24T14:34:33.986913Z",
    "chain": 5,
    "crossChainAccount": "k:d63cee9e2069173f2bdd23f4739fd6f184b53b016e65fdf363f8faa569d3792f",
    "crossChainId": 4,
    "fromAccount": "",
    "height": 3980414,
    "idx": 1,
    "requestKey": "SAkgHdUXWCwDnuT9MYFbwyBKvqXXCUf-_-A0IIM1nvs",
    "toAccount": "k:58aa1853a0c1e53997c076ff9f274423f9f7548a1c22ea3210af3afeadc557e3",
    "token": "coin"
  },

Where the crossChain keys can also be null