All files / src/transports prompt.ts

100% Statements 4/4
75% Branches 6/8
100% Functions 3/3
100% Lines 4/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11113x     2x 31x     4x      
import {PromptElement} from '@wharfkit/session'
 
/** A button offering to move the login to the other Anchor transport. */
export function switchButton(label: string, variant: string, onSelect: () => void): PromptElement {
    return {
        type: 'button',
        label,
        data: {label, variant, onClick: () => onSelect()},
    }
}