|
17 | 17 | </span>
|
18 | 18 | </section>
|
19 | 19 | </section>
|
| 20 | + |
20 | 21 | <section class="participants top-less" v-if="isArbitrarySignature">
|
21 | 22 | <label>{{locale(langKeys.POPOUTS.SIGNATURE.KeysInvolved)}}</label>
|
22 | 23 | <section class="participant">{{arbitraryKeypair.name}} -- {{payload.publicKey.substr(0,6)}}.....{{payload.publicKey.substr(payload.publicKey.length - 5)}}</section>
|
|
29 | 30 | <p>{{locale(langKeys.POPOUTS.SIGNATURE.ArbitraryDisabledDesc)}}</p>
|
30 | 31 | </section>
|
31 | 32 |
|
| 33 | + <section v-if="isDangerous" class="disclaimer less-pad red centered" style="margin-bottom:10px;"> |
| 34 | + One of the actions included within this transaction is <b>dangerous</b>. |
| 35 | + </section> |
| 36 | + |
32 | 37 | <!-- ACCEPT TRANSACTION -->
|
33 |
| - <btn blue="1" v-if="!pinning" |
| 38 | + <btn :blue="!isDangerous" :red="isDangerous" big="1" v-if="!pinning" |
34 | 39 | :disabled="!isValidIdentity || cannotSignArbitrary"
|
35 | 40 | :text="locale(langKeys.GENERIC.Allow)"
|
36 | 41 | v-on:clicked="accepted" />
|
|
39 | 44 | <btn :text="locale(langKeys.GENERIC.Deny)" v-if="!pinning"
|
40 | 45 | v-on:clicked="returnResult(false)" />
|
41 | 46 |
|
42 |
| - <section v-if="!isArbitrarySignature"> |
| 47 | + <section v-if="!isArbitrarySignature && !isDangerous"> |
43 | 48 | <br>
|
44 | 49 | <br>
|
45 | 50 | <label style="text-align:center;">{{locale(langKeys.POPOUTS.SIGNATURE.WhitelistDesc)}}</label>
|
|
77 | 82 | v-on:locationField="(key, val) => clonedLocation[key] = val"
|
78 | 83 | v-on:personalField="(key, val) => selectedIdentity.personal[key] = val" />
|
79 | 84 |
|
80 |
| - <section class="messages" :ref="`message_${index}`" v-for="(message, index) in messages"> |
| 85 | + <section class="messages" :class="{'dangerous':isDangerous}" :ref="`message_${index}`" v-for="(message, index) in messages"> |
| 86 | + |
81 | 87 |
|
82 | 88 | <section class="whitelist-overlay" v-if="isPreviouslyWhitelisted(message)">
|
83 | 89 | <section class="box">
|
|
88 | 94 | <section :class="{'previous-whitelist':isPreviouslyWhitelisted(message)}">
|
89 | 95 |
|
90 | 96 | <section class="details contract-action">
|
| 97 | + |
| 98 | + <section class="danger wiggle" v-if="isDangerous" v-tooltip.right="{content:isDangerous, classes:['dangertip']}"> |
| 99 | + <i class="icon-help"></i> |
| 100 | + </section> |
| 101 | + |
91 | 102 | <figure class="title">
|
92 | 103 | <input v-if="whitelisted && !isPreviouslyWhitelisted(message)"
|
93 | 104 | :checked="!!getWhitelist(message)"
|
|
96 | 107 |
|
97 | 108 | <span @click="collapse(message)">{{message.code}} <i class="contract-split icon-right-open-big"></i> {{message.type}}</span>
|
98 | 109 | </figure>
|
| 110 | + <span class="danger-title" v-if="isDangerous">This action is <b>dangerous</b>!</span> |
99 | 111 | </section>
|
100 | 112 |
|
101 | 113 | <section v-if="!isCollapsed(message)">
|
|
250 | 262 | cannotSignArbitrary(){
|
251 | 263 | if(!this.isArbitrarySignature) return false;
|
252 | 264 | return this.payload.messages[0].data.signing.split(' ').some(x => x.length > 12);
|
| 265 | + }, |
| 266 | + isDangerous(){ |
| 267 | + if(this.messages.find(x => x.code === 'eosio' && x.type === 'updateauth')){ |
| 268 | + return `This action is dangerous. Accepting it will change your keys and possibly give your account to someone else. <br><br><b>Check to make sure the keys are correct.</b>`; |
| 269 | + } |
| 270 | + return false; |
253 | 271 | }
|
254 | 272 | },
|
255 | 273 | methods: {
|
|
529 | 547 | }
|
530 | 548 | }
|
531 | 549 | }
|
| 550 | +
|
| 551 | + &.dangerous { |
| 552 | +
|
| 553 | + .danger { |
| 554 | + cursor: pointer; |
| 555 | + float:left; |
| 556 | + padding:6px 5px 5px; |
| 557 | + background:rgba(0,0,0,0.1); |
| 558 | + box-shadow:inset 0 5px 10px rgba(0,0,0,0.1); |
| 559 | + text-shadow:0 2px 0 rgba(0,0,0,0.1); |
| 560 | + border-radius:4px; |
| 561 | + margin-top:7px; |
| 562 | + margin-right:10px; |
| 563 | +
|
| 564 | + } |
| 565 | +
|
| 566 | + .details { |
| 567 | + &.contract-action { |
| 568 | + background:red; |
| 569 | + background:$red-gradient; |
| 570 | + border-bottom:1px solid darkred; |
| 571 | + color:#fff; |
| 572 | + } |
| 573 | + } |
| 574 | +
|
| 575 | + .danger-title { |
| 576 | + font-size: 11px; |
| 577 | + width:100%; |
| 578 | + } |
| 579 | + } |
532 | 580 | }
|
533 | 581 |
|
534 | 582 | .json-formatter-dark.json-formatter-row {
|
|
0 commit comments