Skip to content

Commit

Permalink
Merge pull request #5311 from Jarsen136/issue-5310
Browse files Browse the repository at this point in the history
fix: My non-carbonless NFT is carbonless
  • Loading branch information
vikiival authored Mar 21, 2023
2 parents 423181a + 0e82378 commit a18b022
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 21 deletions.
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

0 comments on commit a18b022

Please sign in to comment.