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

Add support for SINPE Movil #163

Open
wants to merge 46 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
2c53721
feat: set country selector top left in buy modal
onmax May 30, 2024
da0d25b
feat: add better text defaults for wrapping texts
onmax May 30, 2024
8d9379a
feat: added RouteName enum
onmax May 31, 2024
b8d3daa
feat: added SinpeMovilSellInfoModal
onmax May 31, 2024
c4c8203
feat: Updated logic in sidebar to toggle sell feature
onmax May 31, 2024
0f9b6c8
chore: fix linter issues
onmax Jun 12, 2024
7a109ee
chore: complete RouteName
onmax Jun 12, 2024
663f583
chore: added lint:fix command
onmax Jun 12, 2024
8404f5e
chore: added basic store for sinpe
onmax Jun 12, 2024
fb1a813
chore: added support for CRC and LN_BTC in the current logic
onmax Jun 12, 2024
5279da5
chore: added simple store
onmax Jun 12, 2024
fbd7bdf
feat: added sell sinpe info and phone/otp input modals
onmax Jun 12, 2024
bc45ee9
chore: removed console.log
onmax Jun 12, 2024
2dc5d9f
chore: created initial template for buy/sell
onmax Jun 12, 2024
11be158
chore: lint issues
onmax Jun 12, 2024
619eb20
chore: AssetTransfer UI with data from composables
onmax Jun 13, 2024
dbca53e
chore: add amount components to display values
onmax Jun 13, 2024
117f08d
chore: setMax value and fixed compilation errors
onmax Jun 14, 2024
46e884c
Refactor, cleanup, renaming, TS errors
sisou Jun 14, 2024
c84dd4b
Fix linter errors
sisou Jun 14, 2024
1a7d29d
chore: asset transfer tooltips
onmax Jun 14, 2024
3cc6685
feat: added animation component to sinpe swap
onmax Jun 14, 2024
c35bfd5
chore: check limits of input in DualCurrencyInput instead
onmax Jun 14, 2024
bf9e2a6
chore: simplify ui logic
onmax Jun 14, 2024
c9bb676
chore: remove trailing dot if no decimals are allowed in AmountInput
onmax Jun 17, 2024
8b4ee2a
chore: fiat store updateExchange accept fiat currency as input
onmax Jun 17, 2024
d35054a
chore(swap crc): implemented swap logic
onmax Jun 28, 2024
7ad5b83
progress
onmax Aug 6, 2024
4c2a95e
chore(swap crc): implemented swap logic
onmax Aug 13, 2024
7c52e74
Use different curried functions for the different OASIS instances
sisou Aug 13, 2024
98dbd3c
Use @nimiq/hub-api from Github to pass CI
sisou Aug 15, 2024
ac1fa33
fix: setMax
onmax Aug 18, 2024
736dd37
fix: refactor invalid reason for swap
onmax Aug 18, 2024
b835380
chore: refactor mobile verification
onmax Aug 18, 2024
e35b686
feat: capture esc key when selector is opened
onmax Aug 18, 2024
bdf8a6c
fix: small ui improvments
onmax Aug 18, 2024
6d24011
fix: display 2 decimals in sinpe swap
onmax Aug 18, 2024
bc22a42
chore: Enable sinpe if crc is active or user is in costa rica
onmax Aug 19, 2024
3cb3150
chore: refactor getColor in SwapAnimation
onmax Aug 19, 2024
1180618
chore: refactor logic to detect if route is swap
onmax Aug 19, 2024
697effc
chore: better errors messages and fixes
onmax Aug 19, 2024
4156b1d
chore: check only for eur in the buy and sell crypto modal in the swa…
onmax Aug 20, 2024
47de604
fix: typo
onmax Aug 21, 2024
f4e9a84
chore: add options to capDecimals fn
onmax Aug 21, 2024
f63aacd
chore: improve types
onmax Aug 21, 2024
660a2e7
chore: revert text-wrap changes globally
onmax Aug 22, 2024
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
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"scripts": {
"serve": "yarn pre && yarn vue-cli-service serve --port 8081",
"build": "yarn pre && yarn vue-cli-service build",
"lint": "vue-cli-service lint --no-fix",
"lint": "vue-cli-service lint",
"lint:fix": "vue-cli-service lint --fix",
"build:bitcoinjs": "yarn --silent browserify bitcoinjs-parts.js -p common-shakeify -s BitcoinJS | yarn terser --compress --mangle --source-map --output public/bitcoin/BitcoinJS.min.js",
"build:ci": "yarn pre && build=testnet yarn vue-cli-service build",
"i18n:extract": "node ./node_modules/webpack-i18n-tools/index.js ./src/i18n/en.po",
Expand All @@ -26,11 +27,11 @@
"@formatjs/intl-displaynames": "^3.3.4",
"@linusborg/vue-simple-portal": "^0.1.4",
"@nimiq/electrum-client": "https://github.com/nimiq/electrum-client#build",
"@nimiq/fastspot-api": "^1.8.0",
"@nimiq/hub-api": "^1.8.0",
"@nimiq/fastspot-api": "https://github.com/nimiq/fastspot-api#3a7c4b68529d7ec9ba8955a399412eaae946c528",
"@nimiq/hub-api": "https://gitpkg.now.sh/nimiq/hub/client?f3daa852a1d7c34d31893b61c6f4f20a432bff8a",
"@nimiq/iqons": "^1.5.2",
"@nimiq/libswap": "^1.3.0",
"@nimiq/oasis-api": "^1.1.1",
"@nimiq/libswap": "github:nimiq/libswap-js#f868f6407b122806a89f29c71351e8fb8289e879",
"@nimiq/oasis-api": "github:nimiq/oasis-api-js#fbd74179a5b9590f8e6dfe9b08ca47122db2ce1e",
"@nimiq/oasis-bank-list": "https://github.com/nimiq/oasis-bank-list#main",
"@nimiq/rpc": "^0.4.1",
"@nimiq/style": "^0.8.2",
Expand Down
1 change: 1 addition & 0 deletions src/assets/exchanges/sinpe-movil-full-bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/exchanges/sinpe-movil-full.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions src/components/AddressSelector.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<template>
<div class="flex-column">
<IdenticonStack @click="$emit('openAddressSelector')" :show-bitcoin="showBitcoin" />
<InteractiveShortAddress :address="activeAddressInfo.address" tooltipPosition="bottom right" />
</div>
</template>

<script lang="ts">
import { useAddressStore } from '@/stores/Address';
import { defineComponent } from '@vue/composition-api';
import IdenticonStack from './IdenticonStack.vue';
import InteractiveShortAddress from './InteractiveShortAddress.vue';

export default defineComponent({
props: {
showBitcoin: {
type: Boolean,
default: false,
},
},
setup() {
const { activeAddressInfo } = useAddressStore();

return {
activeAddressInfo,
};
},
components: {
IdenticonStack,
InteractiveShortAddress,
},
});
</script>

<style scoped lang="scss">
.flex-column {
align-items: center;

.identicon-stack {
padding-bottom: 4rem;
}

.interactive-short-address {
margin-top: -3.5rem;
}
}
</style>
9 changes: 8 additions & 1 deletion src/components/AmountInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,18 @@ const AmountInput = defineComponent({
// regExpResult[1] contains the sign
// regExpResult[2] contains the whole integers
// regExpResult[3] contains the decimal point and decimals
return [
let formattedValue = [
props.preserveSign ? (regExpResult[1] || '+') : '',
regExpResult[2] || (regExpResult[3] ? '0' : ''),
regExpResult[3] || '',
].join('');

// Remove trailing dot if no decimals are allowed
if (props.decimals === 0) {
formattedValue = formattedValue.replace(/\.$/, '');
}

return formattedValue;
}
return '';
}
Expand Down
Loading
Loading