File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 44 <p >{{ $t('advanced.import.desc') }}</p >
55 <div v-if =" isSuccess" class =" is_success" >
66 <label >Tx ID</label >
7- <p >{{ txId }}</p >
7+ <p style = " word-break : break-all ; font-size : 13 px " >{{ txId }}</p >
88 </div >
99 <p class =" err" v-else-if =" err" >{{ err }}</p >
1010 <template v-if =" ! isLoading " >
@@ -57,14 +57,25 @@ export default class ChainImport extends Vue {
5757 async atomicImportX() {
5858 this .beforeSubmit ()
5959 if (! this .wallet ) return
60+
61+ // Import from P
6062 try {
6163 let txId = await this .wallet .importToXChain (' P' )
64+ this .onSuccess (txId )
65+ } catch (e ) {
66+ if (this .isSuccess ) return
67+ this .onError (e )
68+ }
69+
70+ // Import from C
71+ try {
6272 // TODO: Change after ledger support
6373 if (this .wallet .type !== ' ledger' ) {
6474 let txId2 = await this .wallet .importToXChain (' C' )
75+ this .onSuccess (txId2 )
6576 }
66- this .onSuccess (txId )
6777 } catch (e ) {
78+ if (this .isSuccess ) return
6879 this .onError (e )
6980 }
7081 }
Original file line number Diff line number Diff line change @@ -370,7 +370,6 @@ export default class ChainTransfer extends Vue {
370370 // STEP 3
371371 async chainImport() {
372372 let wallet: AvaHdWallet = this .$store .state .activeWallet
373-
374373 let importTxId
375374 try {
376375 if (this .targetChain === ' P' ) {
You can’t perform that action at this time.
0 commit comments