This file contains hidden or 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
| const ETH_ADDRESS = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" | |
| const DAI_TOKEN_ADDRESS = "0x6b175474e89094c44da98b954eedeac495271d0f" | |
| const LUSD_TOKEN_ADDRESS = "0x5f98805A4E8be255a32880FDeC7F6728C6568bA0" | |
| const migrateMakerVaultToLiquity = (dsa, helpers, vaultId) => { | |
| // 1. Look up how much collateral and debt exists in the Maker vault | |
| const vault = await helpers.getMakerResolver().getVaultById(vaultId) | |
| const vaultCollateral = vault.ink | |
| const vaultDebt = vault.debt |
This file contains hidden or 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
| const moveLusdGainToStabilityPoolRecipe = (dsa, frontendTagAddress) => { | |
| const spells = dsa.Spell() | |
| const lusdGainId = 1; // ID reference to the LUSD amount that is claimed | |
| const claimStakingGainsSpell = { | |
| connector: "LIQUITY-A", | |
| method: "claimStakingGains", | |
| args: [0, lusdGainId] |
This file contains hidden or 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
| export const asdf = 123 |
This file contains hidden or 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
| import createThunkStore from './ceate-thunk-store' | |
| import { postUser } from './actions' | |
| import { | |
| POST_USER_REQUESTED, | |
| POST_USER_SUCCEEDED, | |
| POST_USER_FAILED, | |
| } from './action-types' | |
| const API_SERVICE_PATH = './api-service' |
This file contains hidden or 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
| import createThunkStore from './create-thunk-store' | |
| import { postUser } from './actions' | |
| import { | |
| POST_USER_REQUESTED, | |
| POST_USER_SUCCEEDED, | |
| POST_USER_FAILED, | |
| } from './action-types' | |
| describe('postUser', () => { | |
| describe('dispatches correct actions', () => { |
This file contains hidden or 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
| import createThunkStore from './create-thunk-store' | |
| import { | |
| POST_USER_REQUESTED, | |
| POST_USER_SUCCEEDED, | |
| POST_USER_FAILED, | |
| } from './action-types' | |
| const API_SERVICE_PATH = './api-service' | |
| describe('postUser', () => { |
This file contains hidden or 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
| // some back ends don't respond correctly if origin header isn't set to target host. | |
| devServer: { | |
| proxy: { | |
| "/api": { | |
| ignorePath: true, | |
| target: "http|https://your-api.com/api", | |
| // secure: false, optional for https | |
| changeOrigin: true, | |
| }, | |
| }, |
This file contains hidden or 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
| // | |
| // Copyright (c) 2014 PayPal. All rights reserved. | |
| // | |
| /** | |
| * The PayPalItem class defines an optional itemization for a payment. | |
| * @see https://developer.paypal.com/docs/api/#item-object for more details. | |
| * @param {String} name: Name of the item. 127 characters max | |
| * @param {Number} quantity: Number of units. 10 characters max. |
This file contains hidden or 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
| <template> | |
| <div class="panel panel-primary"> | |
| <div class="panel-heading"> | |
| <h3 class="panel-title">Details</h3> | |
| </div> | |
| <div class="panel-body"> | |
| <form role="form" class="form-horizontal"> | |
| <div class="form-group"> | |
| <label class="col-sm-2 control-label">Name</label> | |
| <div class="col-sm-10"> |
This file contains hidden or 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
| import {transient} from 'aurelia-framework'; | |
| @transient() | |
| export class ItemDetail { | |
| constructor(){ | |
| this.item = {}; | |
| this.item.Name = Math.random() * 1000; | |
| } | |
| activate(params, config) { |
NewerOlder