Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: My non-carbonless NFT is carbonless #5311

Merged
merged 4 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions components/bsx/Create/CreateToken.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,9 @@
:prefix="urlPrefix"
class="mb-3" />

<BasicSwitch
key="hasCarbonOffset"
v-model="hasCarbonOffset"
label="carbonOffset.carbonOffsetSwitch" />

<div v-show="base.selectedCollection" key="attributes">
<CustomAttributeInput
v-model="attributes"
:prefix-attributes="carbonLessAttribute"
:max="10"
class="mb-3"
visible="collapse.collection.attributes.show"
Expand Down Expand Up @@ -81,7 +75,6 @@
</template>

<script lang="ts">
import { offsetAttribute } from '@/utils/mintUtils'
import ChainMixin from '@/utils/mixins/chainMixin'
import { notificationTypes, showNotification } from '@/utils/notification'
import shouldUpdate from '@/utils/shouldUpdate'
Expand Down Expand Up @@ -170,10 +163,6 @@ export default class CreateToken extends mixins(
this.balanceInput.checkValidity()
}

get hasCarbonOffset() {
return this.preferencesStore.hasCarbonOffset
}

get balanceNotEnoughMessage() {
if (this.balanceNotEnough) {
return this.$t('tooltip.notEnoughBalance')
Expand Down Expand Up @@ -245,10 +234,6 @@ export default class CreateToken extends mixins(
return getKusamaAssetId(this.urlPrefix)
}

get carbonLessAttribute(): Attribute[] {
return offsetAttribute(this.hasCarbonOffset)
}

public checkValidity() {
const balanceInputValid = !this.listed || this.balanceInput?.checkValidity()
const baseTokenFormValid = this.baseTokenForm?.checkValidity()
Expand Down
8 changes: 4 additions & 4 deletions components/rmrk/Create/SimpleMint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -393,12 +393,12 @@ export default class SimpleMint extends mixins(
return this.preferencesStore.hasSupport
}

get hasCarbonOffset(): boolean {
return this.preferencesStore.hasCarbonOffset
get hasCarbonOffset() {
return this.preferencesStore.getHasCarbonOffset
}

get arweaveUpload(): boolean {
return this.preferencesStore.arweaveUpload
set hasCarbonOffset(value: boolean) {
this.preferencesStore.setHasCarbonOffset(value)
}

public checkValidity() {
Expand Down
4 changes: 2 additions & 2 deletions components/settings/Minting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ export default class Minting extends Vue {
this.preferencesStore.setHasSupport(value)
}

get hasCarbonOffset(): boolean {
return this.preferencesStore.hasCarbonOffset
get hasCarbonOffset() {
return this.preferencesStore.getHasCarbonOffset
}

set hasCarbonOffset(value: boolean) {
Expand Down