Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "chore: added new flag to up_import - isDeviceToDeviceImport" #165

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 1 addition & 21 deletions src/components/endpoints/ImportProfile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,15 @@ const web3 = useWeb3Connection()

const universalProfileAddress = ref('')
const isRecovery = ref(false)
const isDeviceToDeviceImportMode = ref(false)
const controllerAddress = ref('')

const onImportProfile = async () => {
clearNotification()

try {
let params: any[] = [universalProfileAddress.value]
// Extension versions prior to 3.0.0.58 will not support more than 1 parameter in the array.
// Thus, 'false' must not be passed or it will break the up_import in test-dapp for extension version < 3.0.0.58
if (isDeviceToDeviceImportMode.value) {
params.push(isDeviceToDeviceImportMode.value)
}

const request = {
method: isRecovery.value ? 'up_recover' : 'up_import',
params,
params: [universalProfileAddress.value],
}
let newControllerAddress: string = await web3.sendRequest(request)
if (newControllerAddress) {
Expand Down Expand Up @@ -67,18 +59,6 @@ const onImportProfile = async () => {
Recover the profile into your extension
</label>
</div>
<div class="field mt-4">
<label class="checkbox">
<input
v-model="isDeviceToDeviceImportMode"
type="checkbox"
:value="isDeviceToDeviceImportMode"
data-testid="isDeviceToDeviceImportMode"
/>
Immitate device-to-device import (sets isDeviceToDeviceImport to
`true`)
</label>
</div>
</div>

<div v-if="controllerAddress" class="notification is-info is-light mt-5">
Expand Down
Loading