integrate Ping Key Manager
This commit is contained in:
parent
1a348f6d3e
commit
10ad6fef38
@ -205,6 +205,12 @@ export async function sign(device, chainId, signerAddress, messages, fee, memo,
|
|||||||
transport = await TransportWebUSB.create()
|
transport = await TransportWebUSB.create()
|
||||||
signer = new LedgerSigner(transport, { hdPaths: [getHdPath(signerAddress)] })
|
signer = new LedgerSigner(transport, { hdPaths: [getHdPath(signerAddress)] })
|
||||||
break
|
break
|
||||||
|
case 'pingKMS':
|
||||||
|
if (!window.PingSigner) {
|
||||||
|
throw new Error('Please install Ping KMS extension')
|
||||||
|
}
|
||||||
|
signer = window.PingSigner
|
||||||
|
break
|
||||||
case 'keplr':
|
case 'keplr':
|
||||||
default:
|
default:
|
||||||
if (!window.getOfflineSigner || !window.keplr) {
|
if (!window.getOfflineSigner || !window.keplr) {
|
||||||
@ -220,7 +226,7 @@ export async function sign(device, chainId, signerAddress, messages, fee, memo,
|
|||||||
// Ensure the address has some tokens to spend
|
// Ensure the address has some tokens to spend
|
||||||
const client = await PingWalletClient.offline(signer)
|
const client = await PingWalletClient.offline(signer)
|
||||||
// const client = await SigningStargateClient.offline(signer)
|
// const client = await SigningStargateClient.offline(signer)
|
||||||
return client.signAmino2(device === 'keplr' ? signerAddress : toSignAddress(signerAddress), messages, fee, memo, signerData)
|
return client.signAmino2(device.startsWith('ledger') ? toSignAddress(signerAddress) : signerAddress, messages, fee, memo, signerData)
|
||||||
// return signDirect(signer, signerAddress, messages, fee, memo, signerData)
|
// return signDirect(signer, signerAddress, messages, fee, memo, signerData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,47 +224,7 @@
|
|||||||
|
|
||||||
<b-row>
|
<b-row>
|
||||||
<b-col>
|
<b-col>
|
||||||
<b-form-group
|
<wallet-input-vue v-model="wallet" />
|
||||||
label="Wallet"
|
|
||||||
label-for="wallet"
|
|
||||||
>
|
|
||||||
<validation-provider
|
|
||||||
v-slot="{ errors }"
|
|
||||||
rules="required"
|
|
||||||
name="wallet"
|
|
||||||
>
|
|
||||||
<b-form-radio-group
|
|
||||||
v-model="wallet"
|
|
||||||
stacked
|
|
||||||
class="demo-inline-spacing"
|
|
||||||
>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="keplr"
|
|
||||||
class="d-none d-md-block"
|
|
||||||
>
|
|
||||||
Keplr
|
|
||||||
</b-form-radio>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="ledgerUSB"
|
|
||||||
>
|
|
||||||
<small>Ledger(USB)</small>
|
|
||||||
</b-form-radio>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="ledgerBle"
|
|
||||||
class="mr-0"
|
|
||||||
>
|
|
||||||
<small>Ledger(Bluetooth)</small>
|
|
||||||
</b-form-radio>
|
|
||||||
</b-form-radio-group>
|
|
||||||
<small class="text-danger">{{ errors[0] }}</small>
|
|
||||||
</validation-provider>
|
|
||||||
</b-form-group>
|
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
</b-form>
|
</b-form>
|
||||||
@ -278,7 +238,7 @@
|
|||||||
import { ValidationProvider, ValidationObserver } from 'vee-validate'
|
import { ValidationProvider, ValidationObserver } from 'vee-validate'
|
||||||
import {
|
import {
|
||||||
BAvatar, BModal, BRow, BCol, BInputGroup, BFormInput, BFormGroup, BFormSelect, BFormSelectOption,
|
BAvatar, BModal, BRow, BCol, BInputGroup, BFormInput, BFormGroup, BFormSelect, BFormSelectOption,
|
||||||
BForm, BFormRadioGroup, BFormRadio, BButton, BInputGroupAppend, BFormCheckbox, BOverlay,
|
BForm, BButton, BInputGroupAppend, BFormCheckbox, BOverlay,
|
||||||
} from 'bootstrap-vue'
|
} from 'bootstrap-vue'
|
||||||
import Ripple from 'vue-ripple-directive'
|
import Ripple from 'vue-ripple-directive'
|
||||||
import {
|
import {
|
||||||
@ -289,6 +249,7 @@ import {
|
|||||||
} from '@/libs/utils'
|
} from '@/libs/utils'
|
||||||
import vSelect from 'vue-select'
|
import vSelect from 'vue-select'
|
||||||
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
||||||
|
import WalletInputVue from './components/WalletInput.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DelegateDialogue',
|
name: 'DelegateDialogue',
|
||||||
@ -303,13 +264,12 @@ export default {
|
|||||||
BFormGroup,
|
BFormGroup,
|
||||||
BFormSelect,
|
BFormSelect,
|
||||||
BFormSelectOption,
|
BFormSelectOption,
|
||||||
BFormRadioGroup,
|
|
||||||
BFormRadio,
|
|
||||||
BFormCheckbox,
|
BFormCheckbox,
|
||||||
vSelect,
|
vSelect,
|
||||||
BButton,
|
BButton,
|
||||||
BInputGroupAppend,
|
BInputGroupAppend,
|
||||||
BOverlay,
|
BOverlay,
|
||||||
|
WalletInputVue,
|
||||||
|
|
||||||
ValidationProvider,
|
ValidationProvider,
|
||||||
ValidationObserver,
|
ValidationObserver,
|
||||||
|
@ -193,47 +193,7 @@
|
|||||||
|
|
||||||
<b-row>
|
<b-row>
|
||||||
<b-col>
|
<b-col>
|
||||||
<b-form-group
|
<wallet-input-vue v-model="wallet" />
|
||||||
label="Wallet"
|
|
||||||
label-for="wallet"
|
|
||||||
>
|
|
||||||
<validation-provider
|
|
||||||
v-slot="{ errors }"
|
|
||||||
rules="required"
|
|
||||||
name="wallet"
|
|
||||||
>
|
|
||||||
<b-form-radio-group
|
|
||||||
v-model="wallet"
|
|
||||||
stacked
|
|
||||||
class="demo-inline-spacing"
|
|
||||||
>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="keplr"
|
|
||||||
class="d-none d-md-block"
|
|
||||||
>
|
|
||||||
Keplr
|
|
||||||
</b-form-radio>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="ledgerUSB"
|
|
||||||
>
|
|
||||||
<small>Ledger(USB)</small>
|
|
||||||
</b-form-radio>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="ledgerBle"
|
|
||||||
class="mr-0"
|
|
||||||
>
|
|
||||||
<small>Ledger(Bluetooth)</small>
|
|
||||||
</b-form-radio>
|
|
||||||
</b-form-radio-group>
|
|
||||||
<small class="text-danger">{{ errors[0] }}</small>
|
|
||||||
</validation-provider>
|
|
||||||
</b-form-group>
|
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
</b-form>
|
</b-form>
|
||||||
@ -247,7 +207,7 @@
|
|||||||
import { ValidationProvider, ValidationObserver } from 'vee-validate'
|
import { ValidationProvider, ValidationObserver } from 'vee-validate'
|
||||||
import {
|
import {
|
||||||
BModal, BRow, BCol, BInputGroup, BFormInput, BFormGroup, BFormSelect, BFormCheckbox,
|
BModal, BRow, BCol, BInputGroup, BFormInput, BFormGroup, BFormSelect, BFormCheckbox,
|
||||||
BForm, BFormRadioGroup, BFormRadio, BInputGroupAppend, BOverlay, BButton, BFormSelectOption,
|
BForm, BInputGroupAppend, BOverlay, BButton, BFormSelectOption,
|
||||||
} from 'bootstrap-vue'
|
} from 'bootstrap-vue'
|
||||||
import {
|
import {
|
||||||
required, email, url, between, alpha, integer, password, min, digits, alphaDash, length,
|
required, email, url, between, alpha, integer, password, min, digits, alphaDash, length,
|
||||||
@ -258,6 +218,7 @@ import {
|
|||||||
formatToken, formatTokenDenom, getLocalAccounts, getUnitAmount, setLocalTxHistory, sign, timeIn,
|
formatToken, formatTokenDenom, getLocalAccounts, getUnitAmount, setLocalTxHistory, sign, timeIn,
|
||||||
} from '@/libs/utils'
|
} from '@/libs/utils'
|
||||||
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
||||||
|
import WalletInputVue from './components/WalletInput.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DepositDialogue',
|
name: 'DepositDialogue',
|
||||||
@ -270,8 +231,6 @@ export default {
|
|||||||
BFormInput,
|
BFormInput,
|
||||||
BFormGroup,
|
BFormGroup,
|
||||||
BFormSelect,
|
BFormSelect,
|
||||||
BFormRadioGroup,
|
|
||||||
BFormRadio,
|
|
||||||
BFormCheckbox,
|
BFormCheckbox,
|
||||||
BInputGroupAppend,
|
BInputGroupAppend,
|
||||||
BOverlay,
|
BOverlay,
|
||||||
@ -280,6 +239,8 @@ export default {
|
|||||||
|
|
||||||
ValidationProvider,
|
ValidationProvider,
|
||||||
ValidationObserver,
|
ValidationObserver,
|
||||||
|
|
||||||
|
WalletInputVue,
|
||||||
// eslint-disable-next-line vue/no-unused-components
|
// eslint-disable-next-line vue/no-unused-components
|
||||||
ToastificationContent,
|
ToastificationContent,
|
||||||
},
|
},
|
||||||
|
@ -193,47 +193,7 @@
|
|||||||
</b-row>
|
</b-row>
|
||||||
<b-row>
|
<b-row>
|
||||||
<b-col>
|
<b-col>
|
||||||
<b-form-group
|
<wallet-input-vue v-model="wallet" />
|
||||||
label="Wallet"
|
|
||||||
label-for="wallet"
|
|
||||||
>
|
|
||||||
<validation-provider
|
|
||||||
v-slot="{ errors }"
|
|
||||||
rules="required"
|
|
||||||
name="wallet"
|
|
||||||
>
|
|
||||||
<b-form-radio-group
|
|
||||||
v-model="wallet"
|
|
||||||
stacked
|
|
||||||
class="demo-inline-spacing"
|
|
||||||
>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="keplr"
|
|
||||||
class="d-none d-md-block"
|
|
||||||
>
|
|
||||||
Keplr
|
|
||||||
</b-form-radio>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="ledgerUSB"
|
|
||||||
>
|
|
||||||
<small>Ledger(USB)</small>
|
|
||||||
</b-form-radio>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="ledgerBle"
|
|
||||||
class="mr-0"
|
|
||||||
>
|
|
||||||
<small>Ledger(Bluetooth)</small>
|
|
||||||
</b-form-radio>
|
|
||||||
</b-form-radio-group>
|
|
||||||
<small class="text-danger">{{ errors[0] }}</small>
|
|
||||||
</validation-provider>
|
|
||||||
</b-form-group>
|
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
</b-form>
|
</b-form>
|
||||||
@ -247,7 +207,7 @@
|
|||||||
import { ValidationProvider, ValidationObserver } from 'vee-validate'
|
import { ValidationProvider, ValidationObserver } from 'vee-validate'
|
||||||
import {
|
import {
|
||||||
BModal, BRow, BCol, BInputGroup, BFormInput, BFormGroup, BFormSelect,
|
BModal, BRow, BCol, BInputGroup, BFormInput, BFormGroup, BFormSelect,
|
||||||
BForm, BFormRadioGroup, BFormRadio, BFormCheckbox, BInputGroupAppend,
|
BForm, BFormCheckbox, BInputGroupAppend,
|
||||||
} from 'bootstrap-vue'
|
} from 'bootstrap-vue'
|
||||||
import {
|
import {
|
||||||
required, email, url, between, alpha, integer, password, min, digits, alphaDash, length,
|
required, email, url, between, alpha, integer, password, min, digits, alphaDash, length,
|
||||||
@ -258,6 +218,7 @@ import {
|
|||||||
} from '@/libs/utils'
|
} from '@/libs/utils'
|
||||||
import vSelect from 'vue-select'
|
import vSelect from 'vue-select'
|
||||||
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
||||||
|
import WalletInputVue from './components/WalletInput.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UnbondDialogue',
|
name: 'UnbondDialogue',
|
||||||
@ -270,14 +231,14 @@ export default {
|
|||||||
BFormInput,
|
BFormInput,
|
||||||
BFormGroup,
|
BFormGroup,
|
||||||
BFormSelect,
|
BFormSelect,
|
||||||
BFormRadioGroup,
|
|
||||||
BFormRadio,
|
|
||||||
vSelect,
|
vSelect,
|
||||||
BFormCheckbox,
|
BFormCheckbox,
|
||||||
BInputGroupAppend,
|
BInputGroupAppend,
|
||||||
|
|
||||||
ValidationProvider,
|
ValidationProvider,
|
||||||
ValidationObserver,
|
ValidationObserver,
|
||||||
|
|
||||||
|
WalletInputVue,
|
||||||
// eslint-disable-next-line vue/no-unused-components
|
// eslint-disable-next-line vue/no-unused-components
|
||||||
ToastificationContent,
|
ToastificationContent,
|
||||||
},
|
},
|
||||||
|
@ -241,47 +241,7 @@
|
|||||||
|
|
||||||
<b-row>
|
<b-row>
|
||||||
<b-col>
|
<b-col>
|
||||||
<b-form-group
|
<wallet-input-vue v-model="wallet" />
|
||||||
label="Wallet"
|
|
||||||
label-for="wallet"
|
|
||||||
>
|
|
||||||
<validation-provider
|
|
||||||
v-slot="{ errors }"
|
|
||||||
rules="required"
|
|
||||||
name="wallet"
|
|
||||||
>
|
|
||||||
<b-form-radio-group
|
|
||||||
v-model="wallet"
|
|
||||||
stacked
|
|
||||||
class="demo-inline-spacing"
|
|
||||||
>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="keplr"
|
|
||||||
class="d-none d-md-block"
|
|
||||||
>
|
|
||||||
Keplr
|
|
||||||
</b-form-radio>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="ledgerUSB"
|
|
||||||
>
|
|
||||||
<small>Ledger(USB)</small>
|
|
||||||
</b-form-radio>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="ledgerBle"
|
|
||||||
class="mr-0"
|
|
||||||
>
|
|
||||||
<small>Ledger(Bluetooth)</small>
|
|
||||||
</b-form-radio>
|
|
||||||
</b-form-radio-group>
|
|
||||||
<small class="text-danger">{{ errors[0] }}</small>
|
|
||||||
</validation-provider>
|
|
||||||
</b-form-group>
|
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
</b-form>
|
</b-form>
|
||||||
@ -295,7 +255,7 @@
|
|||||||
import { ValidationProvider, ValidationObserver } from 'vee-validate'
|
import { ValidationProvider, ValidationObserver } from 'vee-validate'
|
||||||
import {
|
import {
|
||||||
BModal, BRow, BCol, BInputGroup, BInputGroupAppend, BFormInput, BAvatar, BFormGroup, BFormSelect, BFormSelectOption,
|
BModal, BRow, BCol, BInputGroup, BInputGroupAppend, BFormInput, BAvatar, BFormGroup, BFormSelect, BFormSelectOption,
|
||||||
BForm, BFormRadioGroup, BFormRadio, BInputGroupPrepend, BFormCheckbox, BOverlay, BSpinner,
|
BForm, BInputGroupPrepend, BFormCheckbox, BOverlay, BSpinner,
|
||||||
} from 'bootstrap-vue'
|
} from 'bootstrap-vue'
|
||||||
import {
|
import {
|
||||||
required, email, url, between, alpha, integer, password, min, digits, alphaDash, length,
|
required, email, url, between, alpha, integer, password, min, digits, alphaDash, length,
|
||||||
@ -310,6 +270,7 @@ import { coin } from '@cosmjs/amino'
|
|||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import { toHex } from '@cosmjs/encoding'
|
import { toHex } from '@cosmjs/encoding'
|
||||||
import { sha256 } from '@cosmjs/crypto'
|
import { sha256 } from '@cosmjs/crypto'
|
||||||
|
import WalletInputVue from './components/WalletInput.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TransforDialogue',
|
name: 'TransforDialogue',
|
||||||
@ -326,8 +287,6 @@ export default {
|
|||||||
BFormGroup,
|
BFormGroup,
|
||||||
BFormSelect,
|
BFormSelect,
|
||||||
BFormSelectOption,
|
BFormSelectOption,
|
||||||
BFormRadioGroup,
|
|
||||||
BFormRadio,
|
|
||||||
BFormCheckbox,
|
BFormCheckbox,
|
||||||
BSpinner,
|
BSpinner,
|
||||||
vSelect,
|
vSelect,
|
||||||
@ -335,6 +294,8 @@ export default {
|
|||||||
|
|
||||||
ValidationProvider,
|
ValidationProvider,
|
||||||
ValidationObserver,
|
ValidationObserver,
|
||||||
|
|
||||||
|
WalletInputVue,
|
||||||
// eslint-disable-next-line vue/no-unused-components
|
// eslint-disable-next-line vue/no-unused-components
|
||||||
ToastificationContent,
|
ToastificationContent,
|
||||||
},
|
},
|
||||||
|
@ -196,47 +196,7 @@
|
|||||||
|
|
||||||
<b-row>
|
<b-row>
|
||||||
<b-col>
|
<b-col>
|
||||||
<b-form-group
|
<wallet-input-vue v-model="wallet" />
|
||||||
label="Wallet"
|
|
||||||
label-for="wallet"
|
|
||||||
>
|
|
||||||
<validation-provider
|
|
||||||
v-slot="{ errors }"
|
|
||||||
rules="required"
|
|
||||||
name="wallet"
|
|
||||||
>
|
|
||||||
<b-form-radio-group
|
|
||||||
v-model="wallet"
|
|
||||||
stacked
|
|
||||||
class="demo-inline-spacing"
|
|
||||||
>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="keplr"
|
|
||||||
class="d-none d-md-block"
|
|
||||||
>
|
|
||||||
Keplr
|
|
||||||
</b-form-radio>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="ledgerUSB"
|
|
||||||
>
|
|
||||||
<small>Ledger(USB)</small>
|
|
||||||
</b-form-radio>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="ledgerBle"
|
|
||||||
class="mr-0"
|
|
||||||
>
|
|
||||||
<small>Ledger(Bluetooth)</small>
|
|
||||||
</b-form-radio>
|
|
||||||
</b-form-radio-group>
|
|
||||||
<small class="text-danger">{{ errors[0] }}</small>
|
|
||||||
</validation-provider>
|
|
||||||
</b-form-group>
|
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
</b-form>
|
</b-form>
|
||||||
@ -250,7 +210,7 @@
|
|||||||
import { ValidationProvider, ValidationObserver } from 'vee-validate'
|
import { ValidationProvider, ValidationObserver } from 'vee-validate'
|
||||||
import {
|
import {
|
||||||
BModal, BRow, BCol, BInputGroup, BInputGroupAppend, BFormInput, BAvatar, BFormGroup, BFormSelect, BFormSelectOption,
|
BModal, BRow, BCol, BInputGroup, BInputGroupAppend, BFormInput, BAvatar, BFormGroup, BFormSelect, BFormSelectOption,
|
||||||
BForm, BFormRadioGroup, BFormRadio, BInputGroupPrepend, BFormCheckbox,
|
BForm, BInputGroupPrepend, BFormCheckbox,
|
||||||
} from 'bootstrap-vue'
|
} from 'bootstrap-vue'
|
||||||
import {
|
import {
|
||||||
required, email, url, between, alpha, integer, password, min, digits, alphaDash, length,
|
required, email, url, between, alpha, integer, password, min, digits, alphaDash, length,
|
||||||
@ -261,6 +221,7 @@ import {
|
|||||||
} from '@/libs/utils'
|
} from '@/libs/utils'
|
||||||
import { Cosmos } from '@cosmostation/cosmosjs'
|
import { Cosmos } from '@cosmostation/cosmosjs'
|
||||||
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
||||||
|
import WalletInputVue from './components/WalletInput.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TransforDialogue',
|
name: 'TransforDialogue',
|
||||||
@ -277,12 +238,12 @@ export default {
|
|||||||
BFormGroup,
|
BFormGroup,
|
||||||
BFormSelect,
|
BFormSelect,
|
||||||
BFormSelectOption,
|
BFormSelectOption,
|
||||||
BFormRadioGroup,
|
|
||||||
BFormRadio,
|
|
||||||
BFormCheckbox,
|
BFormCheckbox,
|
||||||
|
|
||||||
ValidationProvider,
|
ValidationProvider,
|
||||||
ValidationObserver,
|
ValidationObserver,
|
||||||
|
|
||||||
|
WalletInputVue,
|
||||||
// eslint-disable-next-line vue/no-unused-components
|
// eslint-disable-next-line vue/no-unused-components
|
||||||
ToastificationContent,
|
ToastificationContent,
|
||||||
},
|
},
|
||||||
|
@ -171,47 +171,7 @@
|
|||||||
</b-row>
|
</b-row>
|
||||||
<b-row>
|
<b-row>
|
||||||
<b-col>
|
<b-col>
|
||||||
<b-form-group
|
<wallet-input-vue v-model="wallet" />
|
||||||
label="Wallet"
|
|
||||||
label-for="wallet"
|
|
||||||
>
|
|
||||||
<validation-provider
|
|
||||||
v-slot="{ errors }"
|
|
||||||
rules="required"
|
|
||||||
name="wallet"
|
|
||||||
>
|
|
||||||
<b-form-radio-group
|
|
||||||
v-model="wallet"
|
|
||||||
stacked
|
|
||||||
class="demo-inline-spacing"
|
|
||||||
>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="keplr"
|
|
||||||
class="d-none d-md-block"
|
|
||||||
>
|
|
||||||
Keplr
|
|
||||||
</b-form-radio>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="ledgerUSB"
|
|
||||||
>
|
|
||||||
<small>Ledger(USB)</small>
|
|
||||||
</b-form-radio>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="ledgerBle"
|
|
||||||
class="mr-0"
|
|
||||||
>
|
|
||||||
<small>Ledger(Bluetooth)</small>
|
|
||||||
</b-form-radio>
|
|
||||||
</b-form-radio-group>
|
|
||||||
<small class="text-danger">{{ errors[0] }}</small>
|
|
||||||
</validation-provider>
|
|
||||||
</b-form-group>
|
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
</b-form>
|
</b-form>
|
||||||
@ -225,7 +185,7 @@
|
|||||||
import { ValidationProvider, ValidationObserver } from 'vee-validate'
|
import { ValidationProvider, ValidationObserver } from 'vee-validate'
|
||||||
import {
|
import {
|
||||||
BModal, BRow, BCol, BInputGroup, BFormInput, BFormGroup, BFormSelect, BInputGroupAppend,
|
BModal, BRow, BCol, BInputGroup, BFormInput, BFormGroup, BFormSelect, BInputGroupAppend,
|
||||||
BForm, BFormRadioGroup, BFormRadio, BFormCheckbox,
|
BForm, BFormCheckbox,
|
||||||
} from 'bootstrap-vue'
|
} from 'bootstrap-vue'
|
||||||
import {
|
import {
|
||||||
required, email, url, between, alpha, integer, password, min, digits, alphaDash, length,
|
required, email, url, between, alpha, integer, password, min, digits, alphaDash, length,
|
||||||
@ -236,6 +196,7 @@ import {
|
|||||||
} from '@/libs/utils'
|
} from '@/libs/utils'
|
||||||
import vSelect from 'vue-select'
|
import vSelect from 'vue-select'
|
||||||
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
||||||
|
import WalletInputVue from './components/WalletInput.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UnbondDialogue',
|
name: 'UnbondDialogue',
|
||||||
@ -248,14 +209,14 @@ export default {
|
|||||||
BFormInput,
|
BFormInput,
|
||||||
BFormGroup,
|
BFormGroup,
|
||||||
BFormSelect,
|
BFormSelect,
|
||||||
BFormRadioGroup,
|
|
||||||
BFormRadio,
|
|
||||||
vSelect,
|
vSelect,
|
||||||
BInputGroupAppend,
|
BInputGroupAppend,
|
||||||
BFormCheckbox,
|
BFormCheckbox,
|
||||||
|
|
||||||
ValidationProvider,
|
ValidationProvider,
|
||||||
ValidationObserver,
|
ValidationObserver,
|
||||||
|
|
||||||
|
WalletInputVue,
|
||||||
// eslint-disable-next-line vue/no-unused-components
|
// eslint-disable-next-line vue/no-unused-components
|
||||||
ToastificationContent,
|
ToastificationContent,
|
||||||
},
|
},
|
||||||
|
@ -182,47 +182,7 @@
|
|||||||
|
|
||||||
<b-row>
|
<b-row>
|
||||||
<b-col>
|
<b-col>
|
||||||
<b-form-group
|
<wallet-input-vue v-model="wallet" />
|
||||||
label="Wallet"
|
|
||||||
label-for="wallet"
|
|
||||||
>
|
|
||||||
<validation-provider
|
|
||||||
v-slot="{ errors }"
|
|
||||||
rules="required"
|
|
||||||
name="wallet"
|
|
||||||
>
|
|
||||||
<b-form-radio-group
|
|
||||||
v-model="wallet"
|
|
||||||
stacked
|
|
||||||
class="demo-inline-spacing"
|
|
||||||
>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="keplr"
|
|
||||||
class="d-none d-md-block"
|
|
||||||
>
|
|
||||||
Keplr
|
|
||||||
</b-form-radio>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="ledgerUSB"
|
|
||||||
>
|
|
||||||
<small>Ledger(USB)</small>
|
|
||||||
</b-form-radio>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="ledgerBle"
|
|
||||||
class="mr-0"
|
|
||||||
>
|
|
||||||
<small>Ledger(Bluetooth)</small>
|
|
||||||
</b-form-radio>
|
|
||||||
</b-form-radio-group>
|
|
||||||
<small class="text-danger">{{ errors[0] }}</small>
|
|
||||||
</validation-provider>
|
|
||||||
</b-form-group>
|
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
</b-form>
|
</b-form>
|
||||||
@ -236,7 +196,7 @@
|
|||||||
import { ValidationProvider, ValidationObserver } from 'vee-validate'
|
import { ValidationProvider, ValidationObserver } from 'vee-validate'
|
||||||
import {
|
import {
|
||||||
BModal, BRow, BCol, BInputGroup, BFormInput, BFormGroup, BFormSelect, BFormCheckbox,
|
BModal, BRow, BCol, BInputGroup, BFormInput, BFormGroup, BFormSelect, BFormCheckbox,
|
||||||
BForm, BFormRadioGroup, BFormRadio, BInputGroupAppend, BOverlay, BButton,
|
BForm, BFormRadio, BInputGroupAppend, BOverlay, BButton,
|
||||||
} from 'bootstrap-vue'
|
} from 'bootstrap-vue'
|
||||||
import {
|
import {
|
||||||
required, email, url, between, alpha, integer, password, min, digits, alphaDash, length,
|
required, email, url, between, alpha, integer, password, min, digits, alphaDash, length,
|
||||||
@ -247,6 +207,7 @@ import {
|
|||||||
formatToken, getLocalAccounts, setLocalTxHistory, sign, timeIn,
|
formatToken, getLocalAccounts, setLocalTxHistory, sign, timeIn,
|
||||||
} from '@/libs/utils'
|
} from '@/libs/utils'
|
||||||
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
||||||
|
import WalletInputVue from './components/WalletInput.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'VoteDialogue',
|
name: 'VoteDialogue',
|
||||||
@ -259,7 +220,6 @@ export default {
|
|||||||
BFormInput,
|
BFormInput,
|
||||||
BFormGroup,
|
BFormGroup,
|
||||||
BFormSelect,
|
BFormSelect,
|
||||||
BFormRadioGroup,
|
|
||||||
BFormRadio,
|
BFormRadio,
|
||||||
BFormCheckbox,
|
BFormCheckbox,
|
||||||
BInputGroupAppend,
|
BInputGroupAppend,
|
||||||
@ -268,6 +228,8 @@ export default {
|
|||||||
|
|
||||||
ValidationProvider,
|
ValidationProvider,
|
||||||
ValidationObserver,
|
ValidationObserver,
|
||||||
|
|
||||||
|
WalletInputVue,
|
||||||
// eslint-disable-next-line vue/no-unused-components
|
// eslint-disable-next-line vue/no-unused-components
|
||||||
ToastificationContent,
|
ToastificationContent,
|
||||||
},
|
},
|
||||||
|
@ -108,47 +108,7 @@
|
|||||||
</b-row>
|
</b-row>
|
||||||
<b-row>
|
<b-row>
|
||||||
<b-col>
|
<b-col>
|
||||||
<b-form-group
|
<wallet-input-vue v-model="wallet" />
|
||||||
label="Wallet"
|
|
||||||
label-for="wallet"
|
|
||||||
>
|
|
||||||
<validation-provider
|
|
||||||
v-slot="{ errors }"
|
|
||||||
rules="required"
|
|
||||||
name="wallet"
|
|
||||||
>
|
|
||||||
<b-form-radio-group
|
|
||||||
v-model="wallet"
|
|
||||||
stacked
|
|
||||||
class="demo-inline-spacing"
|
|
||||||
>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="keplr"
|
|
||||||
class="d-none d-md-block"
|
|
||||||
>
|
|
||||||
Keplr
|
|
||||||
</b-form-radio>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="ledgerUSB"
|
|
||||||
>
|
|
||||||
<small>Ledger(USB)</small>
|
|
||||||
</b-form-radio>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="ledgerBle"
|
|
||||||
class="mr-0"
|
|
||||||
>
|
|
||||||
<small>Ledger(Bluetooth)</small>
|
|
||||||
</b-form-radio>
|
|
||||||
</b-form-radio-group>
|
|
||||||
<small class="text-danger">{{ errors[0] }}</small>
|
|
||||||
</validation-provider>
|
|
||||||
</b-form-group>
|
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
</b-form>
|
</b-form>
|
||||||
@ -162,7 +122,7 @@
|
|||||||
import { ValidationProvider, ValidationObserver } from 'vee-validate'
|
import { ValidationProvider, ValidationObserver } from 'vee-validate'
|
||||||
import {
|
import {
|
||||||
BModal, BRow, BCol, BInputGroup, BFormInput, BFormGroup, BFormSelect, BFormCheckbox,
|
BModal, BRow, BCol, BInputGroup, BFormInput, BFormGroup, BFormSelect, BFormCheckbox,
|
||||||
BForm, BFormRadioGroup, BFormRadio, BInputGroupAppend,
|
BForm, BInputGroupAppend,
|
||||||
} from 'bootstrap-vue'
|
} from 'bootstrap-vue'
|
||||||
import {
|
import {
|
||||||
required, email, url, between, alpha, integer, password, min, digits, alphaDash, length,
|
required, email, url, between, alpha, integer, password, min, digits, alphaDash, length,
|
||||||
@ -172,6 +132,7 @@ import {
|
|||||||
formatToken, setLocalTxHistory, sign, timeIn,
|
formatToken, setLocalTxHistory, sign, timeIn,
|
||||||
} from '@/libs/utils'
|
} from '@/libs/utils'
|
||||||
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
||||||
|
import WalletInputVue from './components/WalletInput.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'WithdrawCommissionDialogue',
|
name: 'WithdrawCommissionDialogue',
|
||||||
@ -184,13 +145,13 @@ export default {
|
|||||||
BFormInput,
|
BFormInput,
|
||||||
BFormGroup,
|
BFormGroup,
|
||||||
BFormSelect,
|
BFormSelect,
|
||||||
BFormRadioGroup,
|
|
||||||
BFormRadio,
|
|
||||||
BFormCheckbox,
|
BFormCheckbox,
|
||||||
BInputGroupAppend,
|
BInputGroupAppend,
|
||||||
|
|
||||||
ValidationProvider,
|
ValidationProvider,
|
||||||
ValidationObserver,
|
ValidationObserver,
|
||||||
|
|
||||||
|
WalletInputVue,
|
||||||
// eslint-disable-next-line vue/no-unused-components
|
// eslint-disable-next-line vue/no-unused-components
|
||||||
ToastificationContent,
|
ToastificationContent,
|
||||||
},
|
},
|
||||||
|
@ -116,47 +116,7 @@
|
|||||||
</b-row>
|
</b-row>
|
||||||
<b-row>
|
<b-row>
|
||||||
<b-col>
|
<b-col>
|
||||||
<b-form-group
|
<wallet-input-vue v-model="wallet" />
|
||||||
label="Wallet"
|
|
||||||
label-for="wallet"
|
|
||||||
>
|
|
||||||
<validation-provider
|
|
||||||
v-slot="{ errors }"
|
|
||||||
rules="required"
|
|
||||||
name="wallet"
|
|
||||||
>
|
|
||||||
<b-form-radio-group
|
|
||||||
v-model="wallet"
|
|
||||||
stacked
|
|
||||||
class="demo-inline-spacing"
|
|
||||||
>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="keplr"
|
|
||||||
class="d-none d-md-block"
|
|
||||||
>
|
|
||||||
Keplr
|
|
||||||
</b-form-radio>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="ledgerUSB"
|
|
||||||
>
|
|
||||||
<small>Ledger(USB)</small>
|
|
||||||
</b-form-radio>
|
|
||||||
<b-form-radio
|
|
||||||
v-model="wallet"
|
|
||||||
name="wallet"
|
|
||||||
value="ledgerBle"
|
|
||||||
class="mr-0"
|
|
||||||
>
|
|
||||||
<small>Ledger(Bluetooth)</small>
|
|
||||||
</b-form-radio>
|
|
||||||
</b-form-radio-group>
|
|
||||||
<small class="text-danger">{{ errors[0] }}</small>
|
|
||||||
</validation-provider>
|
|
||||||
</b-form-group>
|
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
</b-form>
|
</b-form>
|
||||||
@ -170,7 +130,7 @@
|
|||||||
import { ValidationProvider, ValidationObserver } from 'vee-validate'
|
import { ValidationProvider, ValidationObserver } from 'vee-validate'
|
||||||
import {
|
import {
|
||||||
BModal, BRow, BCol, BInputGroup, BFormInput, BAvatar, BFormGroup, BFormSelect,
|
BModal, BRow, BCol, BInputGroup, BFormInput, BAvatar, BFormGroup, BFormSelect,
|
||||||
BForm, BFormRadioGroup, BFormRadio, BInputGroupPrepend, BFormCheckbox, BInputGroupAppend,
|
BForm, BInputGroupPrepend, BFormCheckbox, BInputGroupAppend,
|
||||||
} from 'bootstrap-vue'
|
} from 'bootstrap-vue'
|
||||||
import {
|
import {
|
||||||
required, email, url, between, alpha, integer, password, min, digits, alphaDash, length,
|
required, email, url, between, alpha, integer, password, min, digits, alphaDash, length,
|
||||||
@ -179,6 +139,7 @@ import {
|
|||||||
formatToken, getLocalAccounts, getLocalChains, sign, timeIn, setLocalTxHistory, extractAccountNumberAndSequence,
|
formatToken, getLocalAccounts, getLocalChains, sign, timeIn, setLocalTxHistory, extractAccountNumberAndSequence,
|
||||||
} from '@/libs/utils'
|
} from '@/libs/utils'
|
||||||
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
||||||
|
import WalletInputVue from './components/WalletInput.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'WithdrawDialogue',
|
name: 'WithdrawDialogue',
|
||||||
@ -193,13 +154,13 @@ export default {
|
|||||||
BAvatar,
|
BAvatar,
|
||||||
BFormGroup,
|
BFormGroup,
|
||||||
BFormSelect,
|
BFormSelect,
|
||||||
BFormRadioGroup,
|
|
||||||
BFormRadio,
|
|
||||||
BFormCheckbox,
|
BFormCheckbox,
|
||||||
BInputGroupAppend,
|
BInputGroupAppend,
|
||||||
|
|
||||||
ValidationProvider,
|
ValidationProvider,
|
||||||
ValidationObserver,
|
ValidationObserver,
|
||||||
|
|
||||||
|
WalletInputVue,
|
||||||
// eslint-disable-next-line vue/no-unused-components
|
// eslint-disable-next-line vue/no-unused-components
|
||||||
ToastificationContent,
|
ToastificationContent,
|
||||||
},
|
},
|
||||||
|
80
src/views/components/WalletInput.vue
Normal file
80
src/views/components/WalletInput.vue
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
<template>
|
||||||
|
<b-form-group
|
||||||
|
label="Wallet"
|
||||||
|
label-for="wallet"
|
||||||
|
>
|
||||||
|
<validation-provider
|
||||||
|
v-slot="{ errors }"
|
||||||
|
rules="required"
|
||||||
|
name="wallet"
|
||||||
|
>
|
||||||
|
<b-form-radio-group
|
||||||
|
v-model="content"
|
||||||
|
stacked
|
||||||
|
@input="handleInput()"
|
||||||
|
>
|
||||||
|
<b-form-radio
|
||||||
|
name="wallet"
|
||||||
|
value="keplr"
|
||||||
|
class="d-none d-md-block"
|
||||||
|
>
|
||||||
|
Keplr
|
||||||
|
</b-form-radio>
|
||||||
|
<b-form-radio
|
||||||
|
name="wallet"
|
||||||
|
value="pingKMS"
|
||||||
|
class="d-none d-md-block"
|
||||||
|
>
|
||||||
|
Ping KMS
|
||||||
|
</b-form-radio>
|
||||||
|
<b-form-radio
|
||||||
|
name="wallet"
|
||||||
|
value="ledgerUSB"
|
||||||
|
>
|
||||||
|
<small>Ledger(USB)</small>
|
||||||
|
</b-form-radio>
|
||||||
|
<b-form-radio
|
||||||
|
name="wallet"
|
||||||
|
value="ledgerBle"
|
||||||
|
class="mr-0"
|
||||||
|
>
|
||||||
|
<small>Ledger(Bluetooth)</small>
|
||||||
|
</b-form-radio>
|
||||||
|
</b-form-radio-group>
|
||||||
|
<small class="text-danger">{{ errors[0] }}</small>
|
||||||
|
</validation-provider>
|
||||||
|
</b-form-group>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { ValidationProvider } from 'vee-validate'
|
||||||
|
import {
|
||||||
|
BFormRadioGroup, BFormRadio, BFormGroup,
|
||||||
|
} from 'bootstrap-vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'WalletInput',
|
||||||
|
components: {
|
||||||
|
BFormRadioGroup,
|
||||||
|
BFormRadio,
|
||||||
|
BFormGroup,
|
||||||
|
ValidationProvider,
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: String,
|
||||||
|
default: 'keplr',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
content: this.value,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleInput() {
|
||||||
|
this.$emit('input', this.content)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in New Issue
Block a user