Skip to content

Commit

Permalink
offline sign eth tx wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bokkypoobah committed Apr 23, 2024
1 parent f51fa19 commit bce4343
Showing 1 changed file with 25 additions and 30 deletions.
55 changes: 25 additions & 30 deletions docs/offline.html
Original file line number Diff line number Diff line change
Expand Up @@ -290,40 +290,33 @@
<b-card v-if="settings.tabIndex == 1" class="m-0 p-0 border-0" body-class="m-1 p-0">
<!-- :SIGNETHTX -->
<b-card sub-title="Sign ETH Transaction Offline" bg-variant="light" class="p-0 m-1" style="max-width: 800px;">
<b-form-group label="Type:" label-for="signethtx-txtype" label-size="sm" label-cols-sm="2" label-align-sm="right" class="mx-0 my-1 p-0">
<b-form-select size="sm" id="signethtx-txtype" v-model="settings.signEthTx.txType" :options="txTypeOptions" @change="saveSettings();" style="max-width: 300px;"></b-form-select>
</b-form-group>
<b-form-group label="From:" label-for="signethtx-from" label-size="sm" label-cols-sm="2" label-align-sm="right" class="mx-0 my-1 p-0">
<b-form-select size="sm" id="signethtx-from" v-model="signEthTx.from" :options="addressesOptions" v-b-popover.hover.bottom="'Select Wallet'"></b-form-select>
<b-form-select size="sm" id="signethtx-from" v-model="settings.signEthTx.from" :options="addressesOptions" @change="saveSettings();" v-b-popover.hover.bottom="'Select Wallet'"></b-form-select>
</b-form-group>
<b-form-group label="To:" label-for="signethtx-to" label-size="sm" label-cols-sm="2" label-align-sm="right" class="mx-0 my-1 p-0">
<!-- <b-form-group label="To:" label-for="signethtx-to" label-size="sm" label-cols-sm="2" label-align-sm="right" class="mx-0 my-1 p-0">
<b-form-input type="text" size="sm" id="signethtx-to" v-model.trim="signEthTx.to" placeholder="Optional for contract deployment" style="max-width: 500px;"></b-form-input>
</b-form-group>
<b-form-group label="Amount:" label-for="signethtx-amount" label-size="sm" label-cols-sm="2" label-align-sm="right" class="mx-0 my-1 p-0">
</b-form-group> -->
<!-- <b-form-group label="Amount:" label-for="signethtx-amount" label-size="sm" label-cols-sm="2" label-align-sm="right" class="mx-0 my-1 p-0">
<b-input-group style="max-width: 300px;">
<b-form-input type="text" size="sm" id="signethtx-amount" v-model.trim="signEthTx.amount" style="max-width: 200px;"></b-form-input>
<b-input-group-append>
<b-form-select size="sm" v-model="signEthTx.amountUnit" :options="unitOptions"></b-form-select>
</b-input-group-append>
</b-input-group>
</b-form-group>
<b-form-group label="Data:" label-for="signethtx-data" label-size="sm" label-cols-sm="2" label-align-sm="right" class="mx-0 my-1 p-0">
<b-form-textarea size="sm" id="signethtx-data" v-model="signEthTx.data" rows="3" placeholder="Optional, 0x{hex}" style="max-width: 800px;"></b-form-textarea>
</b-form-group>
<b-form-group label="Nonce:" label-for="signethtx-nonce" label-size="sm" label-cols-sm="2" label-align-sm="right" class="mx-0 my-1 p-0">
<b-form-input type="text" size="sm" id="signethtx-nonce" v-model.trim="signEthTx.nonce" placeholder="Latest unused" style="max-width: 150px;"></b-form-input>
</b-form-group>
<!-- <b-form-group label="Message:" label-for="signmessage-message" label-size="sm" label-cols-sm="2" label-align-sm="right" :state="!wallet.mnemonic.phraseError" :invalid-feedback="wallet.mnemonic.phraseError" class="mx-0 my-2 p-0">
<b-form-textarea size="sm" id="signmessage-message" v-model.trim="signMessage.message" rows="3" placeholder="Type/paste your message here, then click [Sign]" style="max-width: 800px;"></b-form-textarea>
</b-form-group> -->
<!-- <b-form-group label="" label-for="signmessage-sign" label-size="sm" label-cols-sm="2" label-align-sm="right" class="mx-0 my-1 p-0">
<b-button size="sm" :disabled="!signMessage.wallet || !signMessage.message" id="signmessage-sign" @click="signMessageSign()" variant="primary">Sign</b-button>
<!-- <b-form-group label="Data:" label-for="signethtx-data" label-size="sm" label-cols-sm="2" label-align-sm="right" class="mx-0 my-1 p-0">
<b-form-textarea size="sm" id="signethtx-data" v-model="signEthTx.data" rows="3" placeholder="Optional, 0x{hex}" style="max-width: 800px;"></b-form-textarea>
</b-form-group> -->
<!-- <b-form-group label="Signature:" label-for="signmessage-signature" label-size="sm" label-cols-sm="2" label-align-sm="right" :state="!wallet.mnemonic.phraseError" :invalid-feedback="wallet.mnemonic.phraseError" class="mx-0 my-2 p-0">
<b-form-textarea size="sm" readonly id="signmessage-signature" v-model.trim="signMessage.signature" rows="3" placeholder="Click [Sign]" style="max-width: 800px;"></b-form-textarea>
<!-- <b-form-group label="Nonce:" label-for="signethtx-nonce" label-size="sm" label-cols-sm="2" label-align-sm="right" class="mx-0 my-1 p-0">
<b-form-input type="text" size="sm" id="signethtx-nonce" v-model.trim="signEthTx.nonce" placeholder="Latest unused" style="max-width: 150px;"></b-form-input>
</b-form-group> -->
</b-card>
<!-- TODO: Send ETH tx, with data field -->
<b-form-group label="Test:" label-for="wallet-testit" label-size="sm" label-cols-sm="2" label-align-sm="right" class="mx-0 my-1 p-0">
<!-- <b-form-group label="Test:" label-for="wallet-testit" label-size="sm" label-cols-sm="2" label-align-sm="right" class="mx-0 my-1 p-0">
<b-button size="sm" id="wallet-testit" @click="testIt()" variant="warning">Test</b-button>
</b-form-group>
</b-form-group> -->
</b-card>

<!-- :ERC20 -->
Expand Down Expand Up @@ -473,16 +466,6 @@
signature: null,
},

signEthTx: {
from: null,
to: null,
amount: null,
amountUnit: "ether",
data: null,
nonce: null,
signature: null,
},

connected: false,
chainId: null,
coinbase: null,
Expand All @@ -492,6 +475,18 @@

settings: {
tabIndex: 0,

signEthTx: {
txType: null,
from: null,
to: null,
amount: null,
amountUnit: "ether",
data: null,
nonce: null,
signature: null,
},

addressesTable: {
filter: null,
currentPage: 1,
Expand Down

0 comments on commit bce4343

Please sign in to comment.