-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixed display wrong transactions on transaction table
feat: added destinationChainId to identify the destination feat: moved logic for host and side network to independent classes feat: added logic to identify if exist most than one network config for host network feat: Updated indexedDB version storage feat: the migration from localstorage to indexedDB now save the destinationChainId fix: fixed error on search transaction component, now display correctly the transaction feat: new logo feat: new prev step for connect wallet and choice the destination network Signed-off-by: Jonathan Huamani <jonathan.huamani@iovlabs.org>
- Loading branch information
1 parent
f7fbaa0
commit 5728278
Showing
17 changed files
with
430 additions
and
193 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<template> | ||
<div class="multi-chain container p-5 mt-5"> | ||
<div class="row justify-content-center"> | ||
<template v-if="!sharedState.isConnected"> | ||
<div class="col-12 text-center"> | ||
<h4>To cross Token or NFT, is necessary to connect your wallet</h4> | ||
</div> | ||
<div class="col-12 text-center"> | ||
<button | ||
id="logIn" | ||
type="button" | ||
class="btn btn-primary badge-pill" | ||
@click="connectWalletClick" | ||
> | ||
Connect Wallet | ||
</button> | ||
</div> | ||
</template> | ||
<template v-if="sharedState.preSettingsEnabled"> | ||
<div class="col-12 text-center"> | ||
<h4> | ||
You are connected with <span class="text-primary">{{ currentNetworkName }}</span> | ||
</h4> | ||
</div> | ||
<div class="col-12 text-center"> | ||
<h4>Please, choose a destination network</h4> | ||
</div> | ||
<div class="col-4 text-center"> | ||
<select id="networks" v-model="sideNetworkConfig" name="networks" class="form-control"> | ||
<option value="" selected disabled>Please select a network</option> | ||
<option | ||
v-for="network in networks" | ||
:key="network.crossToNetwork.networkId" | ||
:value="network.crossToNetwork" | ||
> | ||
{{ network.crossToNetwork.name }} | ||
</option> | ||
</select> | ||
</div> | ||
<div class="col-3"> | ||
<button class="btn btn-primary" @click="selectSideNetwork">Select Destination</button> | ||
</div> | ||
</template> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { store } from '@/store' | ||
export default { | ||
name: 'MultiChain', | ||
data() { | ||
return { | ||
sharedState: store.state, | ||
sideNetworkConfig: '', | ||
} | ||
}, | ||
computed: { | ||
networks() { | ||
return this.sharedState.networksAvailable | ||
}, | ||
currentNetworkName() { | ||
return this.networks[0].name | ||
}, | ||
}, | ||
methods: { | ||
connectWalletClick() { | ||
return store.handleLogin() | ||
}, | ||
selectSideNetwork() { | ||
const { crossToNetwork: hostNetwork } = this.sideNetworkConfig | ||
store.initMainSettings(hostNetwork.networkId, hostNetwork, this.sideNetworkConfig) | ||
}, | ||
}, | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
.multi-chain { | ||
border: 2px solid var(--primary); | ||
border-radius: 10px; | ||
} | ||
.multi-chain-btn { | ||
min-width: 10em; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Network from '@/modules/networks/Network' | ||
import { retry3Times } from '@/utils' | ||
|
||
export default class HostNetwork extends Network { | ||
async getTypesLimits(contract) { | ||
try { | ||
const limits = await retry3Times(contract.methods.getTypesLimits().call) | ||
if (!limits) { | ||
throw new Error(`Wrong value for limits ${limits}`) | ||
} | ||
return limits | ||
} catch (error) { | ||
throw new Error(`Error in getTypesLimits ${error.message}`) | ||
} | ||
} | ||
} |
Oops, something went wrong.