Open sadiqevani opened 6 years ago
Maybe just to define filter? I don't think that changes in components are necessary:
<template>
<div>
{{ 'test' | encodeBase58Check }}
</div>
</template>
<script>
import { Crypto } from '@aeternity/aepp-sdk/es';
export default {
filters: {
encodeBase58Check: data => Crypto.encodeBase58Check(Buffer.from(data)),
},
};
</script>
@davidyuk 's proposal is more re-usable solution because can be used in/with all kinds of tags....
The problem is not to encode the address, but to decode it, and to verify that the address is a valid base58.
Though the comment in there was just a rushed down idea while talking with Emil, so for now I have no actual solution on how to implement this check, i'll look into it this week.
The problem is not to encode the address, but to decode it
You have not mentioned it, can you just use decodeBase58Check
instead?
verify that the address is a valid base58
this issue is related: https://github.com/aeternity/aepp-sdk-js/issues/100
You have not mentioned it, can you just use decodeBase58Check instead?
I'll check that out, when I have some time to work on aepp-components.
base58check as a directive in the component library