agicommies / communex

alternative commune cli/sdk
MIT No Attribution
25 stars 16 forks source link

Better handle existential deposits in transfers #36

Open steinerkelvin opened 5 months ago

steinerkelvin commented 5 months ago

Currently, we are subtracting the "existential deposit" from the transfer amount before doing transfers.

This should be handled in another way.

   def transfer(
            self,
            key: Keypair,
            amount: int,
            dest: Ss58Address,
    ) -> ExtrinsicReceipt:
    # ...
    amount = amount - self.get_existential_deposit()