Fix colors

This commit is contained in:
AlphaX-Projects 2022-03-26 01:37:41 -07:00 committed by GitHub
parent 10f6f95074
commit 6ddfaf6b23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 15 deletions

View File

@ -11,8 +11,8 @@ export default class RegisterNameTransaction extends TransactionBase {
render(html) { render(html) {
return html` return html`
You are registering the name below: You are registering the name below:
<div style="background:#eee; padding:8px; margin:8px 0; border-radius:2px;"> <div style="background: #eee; padding: 8px; margin: 8px 0; border-radius: 5px;">
<span>${this.nameText}</span> <span style="color: #000;">${this.nameText}</span>
</div> </div>
On pressing confirm, the name will be registered! On pressing confirm, the name will be registered!
` `

View File

@ -1,12 +1,8 @@
"use strict"; "use strict";
import TransactionBase from "../TransactionBase.js" import TransactionBase from "../TransactionBase.js"
import publicKeyToAddress from '../../wallet/publicKeyToAddress.js' import publicKeyToAddress from '../../wallet/publicKeyToAddress.js'
import { Base58 } from "../../deps/deps.js"; import { Base58 } from "../../deps/deps.js";
export default class RemoveRewardShareTransaction extends TransactionBase { export default class RemoveRewardShareTransaction extends TransactionBase {
constructor() { constructor() {
super() super()
@ -16,26 +12,23 @@ export default class RemoveRewardShareTransaction extends TransactionBase {
render(html) { render(html) {
return html` return html`
You are removing a reward share transaction associated with account: You are removing a reward share transaction associated with account:
<div style="background:#eee; padding:8px; margin:8px 0; border-radius:2px;"> <div style="background: #eee; padding: 8px; margin: 8px 0; border-radius: 5px;">
<span>${this.constructor.Base58.encode(this._recipient)}</span> <span style="color: #000;">${this.constructor.Base58.encode(this._recipient)}</span>
</div> </div>
On pressing confirm, the rewardshare will be removed and the minting key will become invalid. On pressing confirm, the rewardshare will be removed and the minting key will become invalid.
` `
} }
set rewardShareKeyPairPublicKey(rewardShareKeyPairPublicKey) { set rewardShareKeyPairPublicKey(rewardShareKeyPairPublicKey) {
this._rewardShareKeyPairPublicKey = Base58.decode(rewardShareKeyPairPublicKey) this._rewardShareKeyPairPublicKey = Base58.decode(rewardShareKeyPairPublicKey)
} }
set recipient(recipient) { set recipient(recipient) {
const _address = publicKeyToAddress(this._keyPair.publicKey) const _address = publicKeyToAddress(this._keyPair.publicKey)
this._recipient = recipient instanceof Uint8Array ? recipient : this.constructor.Base58.decode(recipient) this._recipient = recipient instanceof Uint8Array ? recipient : this.constructor.Base58.decode(recipient)
this.fee = _address === recipient ? 0 : 0.001 this.fee = _address === recipient ? 0 : 0.001
} }
set percentageShare(share) { set percentageShare(share) {
this._percentageShare = share * 100 this._percentageShare = share * 100
this._percentageShareBytes = this.constructor.utils.int64ToBytes(this._percentageShare) this._percentageShareBytes = this.constructor.utils.int64ToBytes(this._percentageShare)

View File

@ -1,6 +1,5 @@
import publicKeyToAddress from '../../wallet/publicKeyToAddress.js'
"use strict"; "use strict";
import publicKeyToAddress from '../../wallet/publicKeyToAddress.js'
import TransactionBase from "../TransactionBase.js" import TransactionBase from "../TransactionBase.js"
import nacl from '../../deps/nacl-fast.js' import nacl from '../../deps/nacl-fast.js'
import ed2curve from '../../deps/ed2curve.js' import ed2curve from '../../deps/ed2curve.js'
@ -16,8 +15,8 @@ export default class RewardShareTransaction extends TransactionBase {
return html` return html`
Would you like to create a reward share transaction, sharing <strong>${this._percentageShare / 1e8}%</strong> of your minting rewards with <strong>${this.constructor.Base58.encode(this._recipient)}</strong>? Would you like to create a reward share transaction, sharing <strong>${this._percentageShare / 1e8}%</strong> of your minting rewards with <strong>${this.constructor.Base58.encode(this._recipient)}</strong>?
If yes, you will need to save the key below in order to mint. It can be supplied to any node in order to allow it to mint on your behalf. If yes, you will need to save the key below in order to mint. It can be supplied to any node in order to allow it to mint on your behalf.
<div style="background:#eee; padding:8px; margin:8px 0; border-radius:2px;"> <div style="background: #eee; padding: 8px; margin: 8px 0; border-radius: 5px;">
<span>${this._base58RewardShareSeed}</span> <span style="color: #000;">${this._base58RewardShareSeed}</span>
</div> </div>
On pressing confirm, the rewardshare will be created, but you will still need to supply the above key to a node in order to mint with the account. On pressing confirm, the rewardshare will be created, but you will still need to supply the above key to a node in order to mint with the account.
` `